From 839b5ee434dfdb8e47ca59b401f39d669a25fe5e Mon Sep 17 00:00:00 2001 From: Michael Steenbeek <1478678+Gymnasiast@users.noreply.github.com> Date: Thu, 15 Jan 2026 11:37:37 +0100 Subject: [PATCH] Fix #25745: Crash when a player connection is aborted early (#25811) --- distribution/changelog.txt | 1 + src/openrct2/network/NetworkBase.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index e8dda64b9e..1c675ca032 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -2,6 +2,7 @@ ------------------------------------------------------------------------ - Improved: [#25765] The ‘View options’ and ‘Special track elements’ dropdowns no longer need click-and-hold. - Fix: [#25739] Game freezes when a tab in the New Ride window contains more than 384 items. +- Fix: [#25745] Crash when a player connection is aborted early. - Fix: [#25799] The animated options tab icon of the news window does not always redraw. 0.4.30 (2026-01-04) diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 5517c7267e..7c9b49eeee 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -547,7 +547,10 @@ namespace OpenRCT2::Network if (!ProcessConnection(*connection)) { - LOG_INFO("Disconnecting player %s", connection->player->Name.c_str()); + if (connection->player != nullptr) + LOG_INFO("Disconnecting player %s", connection->player->Name.c_str()); + else + LOG_INFO("Disconnecting unknown player"); connection->Disconnect(); } else