Fix a crash which happened when a unit with no actions.move tried to run (it got past the JS guard because JS code crashed).

This was SVN commit r6237.
This commit is contained in:
Matei
2008-07-16 04:23:44 +00:00
parent fe55a8b734
commit 86ea20df7b
@@ -1301,7 +1301,7 @@ function entityEventPrepareOrder( evt )
break;
case ORDER_RUN:
if ( !this.actions.move.run )
if ( !this.actions.move || !this.actions.move.run )
{
evt.preventDefault();
return;
@@ -2299,4 +2299,4 @@ function updateMessageView()
}
getGUIObjectByName("globalMessage").caption = result;
getGUIObjectByName("globalMessageUnder").caption = result;
}
}