mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 12:50:52 +00:00
MODELDEF: Fixed a crash when a FrameIndex tried to reference a model index that wasn't defined. Fixes #578
This commit is contained in:
parent
9055170a61
commit
2407b2d1f3
1 changed files with 1 additions and 1 deletions
|
@ -200,7 +200,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
foreach(var fs in mds.Frames[targetsprite])
|
||||
{
|
||||
// Sanity checks
|
||||
if(string.IsNullOrEmpty(mds.ModelNames[fs.ModelIndex]))
|
||||
if(fs.ModelIndex >= mds.ModelNames.Count || string.IsNullOrEmpty(mds.ModelNames[fs.ModelIndex]))
|
||||
{
|
||||
LogWarning("Model definition \"" + classname + "\", frame \"" + fs.SpriteName + " " + fs.FrameName + "\" references undefined model index " + fs.ModelIndex);
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue