1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed CID 1366401

This commit is contained in:
DjWarmonger 2016-11-29 17:12:10 +01:00
parent 8058cb3cad
commit 81e7164ef2

View File

@ -271,6 +271,11 @@ void VCAI::heroVisit(const CGHeroInstance *visitor, const CGObjectInstance *visi
{
LOG_TRACE_PARAMS(logAi, "start '%i'; obj '%s'", start % (visitedObj ? visitedObj->getObjectName() : std::string("n/a")));
NET_EVENT_HANDLER;
if (!visitedObj)
{
logAi->error("VCAI::heroVisit called for null object!"); //FIXME: how was that possible anyway and why we need check for it?
return;
}
if(start)
{
markObjectVisited (visitedObj);