- Duke: Fix potential null actor access in gi->CanSave().

This commit is contained in:
Mitchell Richters 2023-04-02 19:18:10 +10:00
parent 7217ce6ff9
commit 9dfb805b38

View file

@ -90,9 +90,9 @@ void GameInterface::MenuSound(EMenuSounds snd)
bool GameInterface::CanSave()
{
if (ud.recstat == 2 || gamestate != GS_LEVEL) return false;
auto &myplayer = ps[myconnectindex];
return (myplayer.GetActor()->spr.extra > 0);
if (ud.recstat == 2) return false;
auto pActor = ps[myconnectindex].GetActor();
return (pActor && pActor->spr.extra > 0);
}
bool GameInterface::StartGame(FNewGameStartup& gs)