mirror of
https://github.com/glest/glest-source.git
synced 2025-08-19 14:41:23 +02:00
- another segfault bugfix for spawned attacks
This commit is contained in:
@@ -154,7 +154,7 @@ void UnitUpdater::updateUnit(Unit *unit) {
|
|||||||
else if(unit->getCommandSize() > 0) {
|
else if(unit->getCommandSize() > 0) {
|
||||||
Command *command= unit->getCurrCommand();
|
Command *command= unit->getCurrCommand();
|
||||||
if(command != NULL) {
|
if(command != NULL) {
|
||||||
const AttackCommandType *act= static_cast<const AttackCommandType*>(command->getCommandType());
|
const AttackCommandType *act= dynamic_cast<const AttackCommandType*>(command->getCommandType());
|
||||||
if( act != NULL && act->getAttackSkillType() != NULL &&
|
if( act != NULL && act->getAttackSkillType() != NULL &&
|
||||||
act->getAttackSkillType()->getSpawnUnit() != "" && act->getAttackSkillType()->getSpawnUnitCount() > 0) {
|
act->getAttackSkillType()->getSpawnUnit() != "" && act->getAttackSkillType()->getSpawnUnitCount() > 0) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user