From af7a322af07494633c2ffaf9a89cb17010345c89 Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Thu, 29 Jan 2026 17:30:55 +0000 Subject: [PATCH] Fix LAN player tooltip crash on null player --- .../GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp | 6 ++++++ .../GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp index 1d9df298e1..44aee12938 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp @@ -889,6 +889,12 @@ void updateGameOptions( void ) //------------------------------------------------------------------------------------------------- void setLANPlayerTooltip(LANPlayer* player) { + if (!player) + { + TheMouse->setCursorTooltip( UnicodeString::TheEmptyString ); + return; + } + UnicodeString tooltip; if (!player->getLogin().isEmpty() || !player->getHost().isEmpty()) diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp index 3deebf2c91..5f6091c9ee 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp @@ -984,6 +984,12 @@ void updateGameOptions( void ) //------------------------------------------------------------------------------------------------- void setLANPlayerTooltip(LANPlayer* player) { + if (!player) + { + TheMouse->setCursorTooltip( UnicodeString::TheEmptyString ); + return; + } + UnicodeString tooltip; if (!player->getLogin().isEmpty() || !player->getHost().isEmpty())