Fix a null pointer dereference in G_GameExit() so we don't crash while we're crashing

git-svn-id: https://svn.eduke32.com/eduke32@7162 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-11-18 18:06:58 +00:00
parent cde7529e39
commit e6955694e2

View file

@ -272,7 +272,8 @@ void G_GameExit(const char *msg)
El_PrintTimes(); El_PrintTimes();
El_DestroyState(&g_ElState); El_DestroyState(&g_ElState);
#endif #endif
if (*msg != 0) g_player[myconnectindex].ps->palette = BASEPAL; if (*msg != 0 && g_player[myconnectindex].ps != NULL)
g_player[myconnectindex].ps->palette = BASEPAL;
if (ud.recstat == 1) if (ud.recstat == 1)
G_CloseDemoWrite(); G_CloseDemoWrite();