From 91a56e78051cb283bfdbbc39025cb93b884ad96d Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 12 Feb 2011 21:47:31 +0000 Subject: [PATCH] - another segfault bugfix for spawned attacks --- source/glest_game/world/unit_updater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glest_game/world/unit_updater.cpp b/source/glest_game/world/unit_updater.cpp index f2ca14af..f96b5568 100644 --- a/source/glest_game/world/unit_updater.cpp +++ b/source/glest_game/world/unit_updater.cpp @@ -154,7 +154,7 @@ void UnitUpdater::updateUnit(Unit *unit) { else if(unit->getCommandSize() > 0) { Command *command= unit->getCurrCommand(); if(command != NULL) { - const AttackCommandType *act= static_cast(command->getCommandType()); + const AttackCommandType *act= dynamic_cast(command->getCommandType()); if( act != NULL && act->getAttackSkillType() != NULL && act->getAttackSkillType()->getSpawnUnit() != "" && act->getAttackSkillType()->getSpawnUnitCount() > 0) {