mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 19:52:25 +01:00
added null check in case typedef foudn a bug
This commit is contained in:
parent
e3a8ee6d2f
commit
a061289c1c
@ -1697,6 +1697,10 @@ void UnitUpdater::updateRepair(Unit *unit, int frameIndex) {
|
||||
//}
|
||||
|
||||
Command *command= unit->getCurrCommand();
|
||||
if(command == NULL) {
|
||||
throw megaglest_runtime_error("command == NULL");
|
||||
}
|
||||
|
||||
const RepairCommandType *rct= static_cast<const RepairCommandType*>(command->getCommandType());
|
||||
const CommandType *ct = (command != NULL ? command->getCommandType() : NULL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user