From 47e4c8d6e6db834c9a25efa4f1fb5893e4fa1db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= <mwu-tow@gazeta.pl> Date: Sun, 29 May 2011 14:06:52 +0000 Subject: [PATCH] Probably fixed #732, one more fix for spawning wandering monsters. --- client/CPlayerInterface.cpp | 3 +++ lib/CCreatureSet.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index 1dd48c04f..b10d3aab0 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -1329,7 +1329,10 @@ void CPlayerInterface::update() //in some conditions we may receive calls before selection is initialized - we must ignore them if(adventureInt && !adventureInt->selection && GH.topInt() == adventureInt) + { + pim->unlock(); return; + } // Handles mouse and key input GH.updateTime(); diff --git a/lib/CCreatureSet.cpp b/lib/CCreatureSet.cpp index 2c59ad9cc..73d26a08a 100644 --- a/lib/CCreatureSet.cpp +++ b/lib/CCreatureSet.cpp @@ -525,8 +525,8 @@ void CStackInstance::setType(const CCreature *c) } type = c; - - attachTo(const_cast<CCreature*>(type)); + if(type) + attachTo(const_cast<CCreature*>(type)); } std::string CStackInstance::bonusToString(Bonus *bonus, bool description) const {