diff --git a/source/glest_game/world/unit_updater.cpp b/source/glest_game/world/unit_updater.cpp index 0446e836..5a621aa1 100644 --- a/source/glest_game/world/unit_updater.cpp +++ b/source/glest_game/world/unit_updater.cpp @@ -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(command->getCommandType()); const CommandType *ct = (command != NULL ? command->getCommandType() : NULL);