Browse Source

Replaced AI assertion failure with error in log

Ivan Savenko 2 years ago
parent
commit
144ddba97d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      AI/Nullkiller/AIUtility.cpp

+ 3 - 1
AI/Nullkiller/AIUtility.cpp

@@ -109,7 +109,9 @@ const CGHeroInstance * HeroPtr::get(bool doWeExpectNull) const
 		}
 		else
 		{
-			assert(obj);
+			if (!obj)
+				logAi->error("Accessing no longer accessible hero %s!", h->getNameTranslated());
+			//assert(obj);
 			//assert(owned);
 		}
 	}