Skip to content

Commit

Permalink
Fix CClientGUIManager::Exists (#3868)
Browse files Browse the repository at this point in the history
Fixes crash under strange conditions
  • Loading branch information
G-Moris authored Dec 14, 2024
1 parent 9ab6104 commit 779183f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Client/mods/deathmatch/logic/CClientGUIManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void CClientGUIManager::DeleteAll()

bool CClientGUIManager::Exists(CClientGUIElement* pGUIElement)
{
return m_Elements.Contains(pGUIElement);
return pGUIElement ? m_Elements.Contains(pGUIElement) : false;
}

bool CClientGUIManager::Exists(CGUIElement* pCGUIElement)
Expand Down

0 comments on commit 779183f

Please sign in to comment.