From d2fbc3f857194e7d07e822ba6c3e3c8b0841156a Mon Sep 17 00:00:00 2001 From: pavanvo Date: Mon, 5 Sep 2022 18:17:19 +0400 Subject: [PATCH] fix: add check, if(unitType != NULL && ct->getClass() == ccBuild) --- source/glest_game/game/commander.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glest_game/game/commander.cpp b/source/glest_game/game/commander.cpp index a6881800..9ba5b7b4 100644 --- a/source/glest_game/game/commander.cpp +++ b/source/glest_game/game/commander.cpp @@ -1057,7 +1057,7 @@ Command* Commander::buildCommand(const NetworkCommand* networkCommand) const { //create command Command *command= NULL; if(isCancelPreMorphCommand == false) { - if(unitType != NULL) { + if(unitType != NULL && ct->getClass() == ccBuild) { command= new Command(ct, networkCommand->getPosition(), unitType, facing); } else if(target == NULL) {