mirror of
https://github.com/glest/glest-source.git
synced 2025-08-31 19:51:44 +02:00
added null check in case typedef foudn a bug
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user