Fix G_SaveGameData crash if quit early

Fixes a crash that can occur if data struct is passed to G_SaveGameData before it is allocated.
This commit is contained in:
SteelT 2024-02-14 02:20:13 -05:00
parent e26f1b4027
commit 97afd18e96

View file

@ -4621,6 +4621,9 @@ void G_SaveGameData(gamedata_t *data)
INT32 curmare;
if (!data)
return; // data struct not valid
if (!data->loaded)
return; // If never loaded (-nodata), don't save