Skip to content

Commit

Permalink
Prevent dereferencing null Messageman from DLMan at shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Jan 8, 2021
1 parent 8baefeb commit 7939ca2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Etterna/Singletons/DownloadManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,9 @@ DownloadManager::EndSession()
sessionUser = sessionPass = authToken = "";
topScores.clear();
sessionRatings.clear();
MESSAGEMAN->Broadcast("LogOut");
// This is called on a shutdown, after MessageManager is gone
if (MESSAGEMAN != nullptr)
MESSAGEMAN->Broadcast("LogOut");
}

std::vector<std::string>
Expand Down

0 comments on commit 7939ca2

Please sign in to comment.