Skip to content

Commit 15cf476

Browse files
authored
Merge pull request #495 from GeneralsOnlineDevelopmentTeam/seer/fix/gui-scorescreen-null-parent
bugfix(gui): Prevent null pointer dereference in ScoreScreen
2 parents 94422d3 + bb025d3 commit 15cf476

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus
  • Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1779,7 +1779,7 @@ void grabMultiPlayerInfo()
17791779
Int adder = 1; // Varible used to add on an offset to the score to make sure we don't add people to the same map
17801780

17811781
player = ThePlayerList->getLocalPlayer();
1782-
if (player)
1782+
if (player && parent)
17831783
{
17841784
const Image *image = TheMappedImageCollection->findImageByName("MutiPlayer_ScoreScreen");
17851785
if(image)

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2296,7 +2296,7 @@ void grabMultiPlayerInfo( void )
22962296
Int adder = 1; // Varible used to add on an offset to the score to make sure we don't add people to the same map
22972297

22982298
player = ThePlayerList->getLocalPlayer();
2299-
if (player)
2299+
if (player && parent)
23002300
{
23012301
const Image *image = TheMappedImageCollection->findImageByName("MutiPlayer_ScoreScreen");
23022302
if(image)

0 commit comments

Comments
 (0)