Skip to content

Commit 779183f

Browse files
authored
Fix CClientGUIManager::Exists (#3868)
Fixes crash under strange conditions
1 parent 9ab6104 commit 779183f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Client/mods/deathmatch/logic/CClientGUIManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void CClientGUIManager::DeleteAll()
4343

4444
bool CClientGUIManager::Exists(CClientGUIElement* pGUIElement)
4545
{
46-
return m_Elements.Contains(pGUIElement);
46+
return pGUIElement ? m_Elements.Contains(pGUIElement) : false;
4747
}
4848

4949
bool CClientGUIManager::Exists(CGUIElement* pCGUIElement)

0 commit comments

Comments
 (0)