Browse Source

Fix potential nullptr dereference

Ivan Savenko 2 years ago
parent
commit
0c023347dd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client/CPlayerInterface.cpp

+ 1 - 1
client/CPlayerInterface.cpp

@@ -2033,7 +2033,7 @@ bool CPlayerInterface::capturedAllEvents()
 		return true;
 	}
 
-	bool needToLockAdventureMap = adventureInt->active && CGI->mh->hasOngoingAnimations();
+	bool needToLockAdventureMap = adventureInt && adventureInt->active && CGI->mh->hasOngoingAnimations();
 
 	if (ignoreEvents || needToLockAdventureMap)
 	{