mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 22:01:01 +00:00
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:
parent
e26f1b4027
commit
97afd18e96
1 changed files with 3 additions and 0 deletions
|
@ -4621,6 +4621,9 @@ void G_SaveGameData(gamedata_t *data)
|
||||||
|
|
||||||
INT32 curmare;
|
INT32 curmare;
|
||||||
|
|
||||||
|
if (!data)
|
||||||
|
return; // data struct not valid
|
||||||
|
|
||||||
if (!data->loaded)
|
if (!data->loaded)
|
||||||
return; // If never loaded (-nodata), don't save
|
return; // If never loaded (-nodata), don't save
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue