mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Fixed regression.
This commit is contained in:
parent
67d5cee05e
commit
72a36b92d6
@ -271,12 +271,8 @@ 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)
|
||||
|
||||
if(start && visitedObj) //we can end visit with null object, anyway
|
||||
{
|
||||
markObjectVisited (visitedObj);
|
||||
unreserveObject(visitor, visitedObj);
|
||||
|
Loading…
Reference in New Issue
Block a user