mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 07:57:58 +00:00
Fixed crash on returning to title screen
https://mantis.zdoom.org/view.php?id=615
This commit is contained in:
parent
4e1e527b2c
commit
370b639ab1
2 changed files with 8 additions and 4 deletions
|
@ -732,10 +732,6 @@ DIntermissionController::DIntermissionController(FIntermissionDescriptor *Desc,
|
||||||
mScreen = NULL;
|
mScreen = NULL;
|
||||||
mFirst = true;
|
mFirst = true;
|
||||||
mGameState = state;
|
mGameState = state;
|
||||||
|
|
||||||
// If the intermission finishes straight away then cancel the wipe.
|
|
||||||
if(!NextPage())
|
|
||||||
wipegamestate = GS_FINALE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DIntermissionController::NextPage ()
|
bool DIntermissionController::NextPage ()
|
||||||
|
@ -898,6 +894,13 @@ void F_StartIntermission(FIntermissionDescriptor *desc, bool deleteme, uint8_t s
|
||||||
viewactive = false;
|
viewactive = false;
|
||||||
automapactive = false;
|
automapactive = false;
|
||||||
DIntermissionController::CurrentIntermission = Create<DIntermissionController>(desc, deleteme, state);
|
DIntermissionController::CurrentIntermission = Create<DIntermissionController>(desc, deleteme, state);
|
||||||
|
|
||||||
|
// If the intermission finishes straight away then cancel the wipe.
|
||||||
|
if (!DIntermissionController::CurrentIntermission->NextPage())
|
||||||
|
{
|
||||||
|
wipegamestate = GS_FINALE;
|
||||||
|
}
|
||||||
|
|
||||||
GC::WriteBarrier(DIntermissionController::CurrentIntermission);
|
GC::WriteBarrier(DIntermissionController::CurrentIntermission);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -304,6 +304,7 @@ public:
|
||||||
void OnDestroy() override;
|
void OnDestroy() override;
|
||||||
|
|
||||||
friend void F_AdvanceIntermission();
|
friend void F_AdvanceIntermission();
|
||||||
|
friend void F_StartIntermission(FIntermissionDescriptor *, bool, uint8_t);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue