1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

server/battles/BattleFlowProcessor.cpp: Called C++ object pointer is null

Null pointers should not be dereferenced
This commit is contained in:
Alexander Wilms 2023-10-27 20:00:52 +00:00
parent 860f6150aa
commit cc8cc11da3

View File

@ -284,7 +284,7 @@ const CStack * BattleFlowProcessor::getNextStack(const CBattleInfoCallback & bat
gameHandler->sendAndApply(&bte);
}
if(!next->willMove())
if(!next || !next->willMove())
return nullptr;
return stack;