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();
|
Command *command= unit->getCurrCommand();
|
||||||
|
if(command == NULL) {
|
||||||
|
throw megaglest_runtime_error("command == NULL");
|
||||||
|
}
|
||||||
|
|
||||||
const RepairCommandType *rct= static_cast<const RepairCommandType*>(command->getCommandType());
|
const RepairCommandType *rct= static_cast<const RepairCommandType*>(command->getCommandType());
|
||||||
const CommandType *ct = (command != NULL ? command->getCommandType() : NULL);
|
const CommandType *ct = (command != NULL ? command->getCommandType() : NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue