Browse Source

Possible fix for crash from Android crash reporting

Ivan Savenko 2 years ago
parent
commit
041236837b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/CHeroHandler.cpp

+ 1 - 1
lib/CHeroHandler.cpp

@@ -770,7 +770,7 @@ std::vector<bool> CHeroHandler::getDefaultAllowed() const
 
 	for(const CHero * hero : objects)
 	{
-		allowedHeroes.push_back(!hero->special);
+		allowedHeroes.push_back(hero && !hero->special);
 	}
 
 	return allowedHeroes;