diff options
author | Darkvater <Darkvater@openttd.org> | 2005-05-30 14:45:36 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2005-05-30 14:45:36 +0000 |
commit | 9c552d16317a7fe1ff4516c5021ebd0e7c82b906 (patch) | |
tree | a5b5323b899dcbd198167576e63285356aead5e3 /command.c | |
parent | 3d9ff47f93cf3205912f8655725351e860d92af2 (diff) | |
download | openttd-9c552d16317a7fe1ff4516c5021ebd0e7c82b906.tar.xz |
(svn r2383) - Fix: Monkey-testing turned up some command crashes.
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -428,6 +428,10 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, // get pointer to command handler assert((cmd & 0xFF) < lengthof(_command_proc_table)); proc = _command_proc_table[cmd & 0xFF].proc; + if (proc == NULL) { + _cmd_text = NULL; + return false; + } // Some commands have a different output in dryrun than the realrun // e.g.: if you demolish a whole town, the dryrun would say okay. |