Skip to content

Commit

Permalink
Null check NSMAN from Gamestate
Browse files Browse the repository at this point in the history
yeah i shouldnt be doing this anyways but its a good thing to null check pointers too so take that society
  • Loading branch information
poco0317 committed Nov 24, 2019
1 parent 85a3aa6 commit feaa753
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Etterna/Singletons/GameState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,8 @@ void
GameState::TogglePracticeMode(bool set)
{
// If we are online, never allow turning practice mode on.
if (NSMAN->isSMOnline && NSMAN->loggedIn && NSMAN->IsETTP())
if (NSMAN != nullptr && NSMAN->isSMOnline && NSMAN->loggedIn &&
NSMAN->IsETTP())
set = false;

m_pPlayerState->m_PlayerOptions.GetCurrent().m_bPractice = set;
Expand Down

0 comments on commit feaa753

Please sign in to comment.