diff --git a/src/dthinker.cpp b/src/dthinker.cpp index 1744834674..cb221898e9 100644 --- a/src/dthinker.cpp +++ b/src/dthinker.cpp @@ -367,7 +367,7 @@ void DThinker::ChangeStatNum (int statnum) { FThinkerList *list; - Level = currentSession->Levelinfo[0]; // fixme later. + Level = currentSession == nullptr ? nullptr : currentSession->Levelinfo[0]; // fixme later. if ((unsigned)statnum > MAX_STATNUM) {