- Fixed potential uninitialized access in FMapInfoParser::ParseEndGame().

SVN r4287 (trunk)
This commit is contained in:
Randy Heit 2013-05-26 02:56:25 +00:00
parent ce28c9c991
commit 17c7c32a58

View file

@ -660,7 +660,7 @@ FName FMapInfoParser::ParseEndGame()
}
}
FIntermissionDescriptor *desc = new FIntermissionDescriptor;
FIntermissionAction *action;
FIntermissionAction *action = NULL;
switch (newSeq.EndType)
{
@ -699,6 +699,13 @@ FName FMapInfoParser::ParseEndGame()
break;
}
if (action == NULL)
{
sc.ScriptError("Endgame type was not defined");
return NAME_None; // We won't really get here.
}
else
{
action->mBackground = newSeq.PicName;
action->mMusic = newSeq.Music;
action->mMusicLooping = newSeq.MusicLooping;
@ -708,6 +715,7 @@ FName FMapInfoParser::ParseEndGame()
seq.Format("@EndSequence_%d_", generated++);
ReplaceIntermission(seq, desc);
return FName(seq);
}
}
//==========================================================================