- check for null property before trying to copy properties
This commit is contained in:
parent
46b82360b0
commit
86b7f1b26a
1 changed files with 7 additions and 3 deletions
|
@ -133,6 +133,7 @@ void
|
|||
FGBinding::fire (double setting) const
|
||||
{
|
||||
SGPropertyNode arg;
|
||||
if (_arg != 0)
|
||||
copyProperties(_arg, &arg);
|
||||
arg.setDoubleValue("setting", setting);
|
||||
_fire(&arg);
|
||||
|
@ -199,6 +200,9 @@ FGInput::update ()
|
|||
void
|
||||
FGInput::doKey (int k, int modifiers, int x, int y)
|
||||
{
|
||||
SG_LOG(SG_INPUT, SG_INFO, "User pressed key " << k
|
||||
<< " with modifiers " << modifiers);
|
||||
|
||||
// Sanity check.
|
||||
if (k < 0 || k >= MAX_KEYS) {
|
||||
SG_LOG(SG_INPUT, SG_ALERT, "Key value " << k << " out of range");
|
||||
|
|
Loading…
Reference in a new issue