1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Fix crash on reveal puzzle cheat

This commit is contained in:
Ivan Savenko 2023-12-24 18:19:05 +02:00
parent b5f56f29fa
commit a001f4e407

View File

@ -384,7 +384,7 @@ void PlayerMessageProcessor::cheatPuzzleReveal(PlayerColor player)
for(auto & obj : gameHandler->gameState()->map->objects)
{
if(obj->ID == Obj::OBELISK)
if(obj && obj->ID == Obj::OBELISK)
{
gameHandler->setObjPropertyID(obj->id, ObjProperty::OBELISK_VISITED, t->id);
for(const auto & color : t->players)