From 7a3d4ead7fd7bc50f381e63b989e927244a9139a Mon Sep 17 00:00:00 2001 From: Barinade Date: Wed, 25 Aug 2021 17:47:05 -0500 Subject: [PATCH] prevent random crash in player when playerstage disappears this shouldnt be possible but alas, our game does not have good code quality --- src/Etterna/Actor/Gameplay/Player.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Etterna/Actor/Gameplay/Player.cpp b/src/Etterna/Actor/Gameplay/Player.cpp index 2b5a70aa45..7cf00e7d71 100644 --- a/src/Etterna/Actor/Gameplay/Player.cpp +++ b/src/Etterna/Actor/Gameplay/Player.cpp @@ -1397,10 +1397,7 @@ Player::UpdateHoldNotes(int iSongRow, void Player::DrawPrimitives() { - // TODO(Sam): Remove use of PlayerNumber. - const auto pn = m_pPlayerState->m_PlayerNumber; - - if (pn != PLAYER_1) { + if (m_pPlayerState == nullptr) { return; }