fix: add check,

if(unitType != NULL && ct->getClass() == ccBuild)
This commit is contained in:
pavanvo 2022-09-05 18:17:19 +04:00
parent 22a2abd3f4
commit d2fbc3f857
No known key found for this signature in database
GPG Key ID: 34C1C36681B4AD84
1 changed files with 1 additions and 1 deletions

View File

@ -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) {