Skip to content

Commit

Permalink
prevent random crash in player when playerstage disappears
Browse files Browse the repository at this point in the history
this shouldnt be possible but alas, our game does not have good code quality
  • Loading branch information
poco0317 committed Aug 25, 2021
1 parent 1bc52f1 commit 7a3d4ea
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Etterna/Actor/Gameplay/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7a3d4ea

Please sign in to comment.