mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Fixed potential uninitialized access in FMapInfoParser::ParseEndGame().
SVN r4287 (trunk)
This commit is contained in:
parent
ce28c9c991
commit
17c7c32a58
1 changed files with 17 additions and 9 deletions
|
@ -660,7 +660,7 @@ FName FMapInfoParser::ParseEndGame()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FIntermissionDescriptor *desc = new FIntermissionDescriptor;
|
FIntermissionDescriptor *desc = new FIntermissionDescriptor;
|
||||||
FIntermissionAction *action;
|
FIntermissionAction *action = NULL;
|
||||||
|
|
||||||
switch (newSeq.EndType)
|
switch (newSeq.EndType)
|
||||||
{
|
{
|
||||||
|
@ -699,15 +699,23 @@ FName FMapInfoParser::ParseEndGame()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
action->mBackground = newSeq.PicName;
|
if (action == NULL)
|
||||||
action->mMusic = newSeq.Music;
|
{
|
||||||
action->mMusicLooping = newSeq.MusicLooping;
|
sc.ScriptError("Endgame type was not defined");
|
||||||
desc->mActions.Push(action);
|
return NAME_None; // We won't really get here.
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
action->mBackground = newSeq.PicName;
|
||||||
|
action->mMusic = newSeq.Music;
|
||||||
|
action->mMusicLooping = newSeq.MusicLooping;
|
||||||
|
desc->mActions.Push(action);
|
||||||
|
|
||||||
FString seq;
|
FString seq;
|
||||||
seq.Format("@EndSequence_%d_", generated++);
|
seq.Format("@EndSequence_%d_", generated++);
|
||||||
ReplaceIntermission(seq, desc);
|
ReplaceIntermission(seq, desc);
|
||||||
return FName(seq);
|
return FName(seq);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
Loading…
Reference in a new issue