mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-12 05:56:15 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user