From 83c3f3a9056cf788749aedbddedaf52592a4adb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= Date: Sun, 28 Oct 2018 17:36:18 +0100 Subject: [PATCH] Fix #8121: Crash renaming park with server logging enabled. (#8177) --- distribution/changelog.txt | 1 + src/openrct2/actions/ParkSetNameAction.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 4ad24f459c..7e98c14a67 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -22,6 +22,7 @@ - Fix: [#8090] Maze designs saved incorrectly. - Fix: [#8101] Title sequences window flashes after opening. - Fix: [#8120] Crash trying to place peep spawn outside of map. +- Fix: [#8121] Crash Renaming park with server logging enabled. - Improved: [#2940] Allow mouse-dragging to set patrol area (Singleplayer only). - Improved: [#7730] Draw extreme vertical and lateral Gs red in the ride window's graph tab. - Improved: [#7930] Automatically create folders for custom content. diff --git a/src/openrct2/actions/ParkSetNameAction.hpp b/src/openrct2/actions/ParkSetNameAction.hpp index 91adf2b50d..9f0d2901b2 100644 --- a/src/openrct2/actions/ParkSetNameAction.hpp +++ b/src/openrct2/actions/ParkSetNameAction.hpp @@ -109,7 +109,7 @@ private: void LogAction(const std::string& oldName) const { // Get player name - auto playerIndex = network_get_player_index(game_command_playerid); + auto playerIndex = network_get_player_index(GetPlayer()); auto playerName = network_get_player_name(playerIndex); char logMessage[256];