mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- gracefully handle when a map tries to exit twice.
This case left a broken ScreenJobRunner behind which later crashed on garbage collection.
This commit is contained in:
parent
40cee808a1
commit
4b9ea92969
2 changed files with 3 additions and 1 deletions
|
@ -195,7 +195,6 @@ static void GameTicker()
|
|||
FX_StopAllSounds();
|
||||
FX_SetReverb(0);
|
||||
gi->LevelCompleted(g_nextmap, g_nextskill);
|
||||
assert(gameaction != ga_nothing);
|
||||
break;
|
||||
|
||||
case ga_nextlevel:
|
||||
|
|
|
@ -160,6 +160,7 @@ void ShowScoreboard(int numplayers, const CompletionFunc& completion_)
|
|||
{
|
||||
completion = completion_;
|
||||
runner = CreateRunner();
|
||||
Printf("Created runner at %p\n", runner);
|
||||
GC::WriteBarrier(runner);
|
||||
|
||||
const char* qname = globalCutscenes.MPSummaryScreen;
|
||||
|
@ -188,6 +189,8 @@ void ShowScoreboard(int numplayers, const CompletionFunc& completion_)
|
|||
|
||||
void ShowIntermission(MapRecord* fromMap, MapRecord* toMap, SummaryInfo* info, CompletionFunc completion_)
|
||||
{
|
||||
if (runner != nullptr)
|
||||
return; // protection against double exits.
|
||||
if (fromMap == toMap)
|
||||
{
|
||||
// don't show intermission when restarting the same level.
|
||||
|
|
Loading…
Reference in a new issue