Fixed, Open Map Option window: a warning message is now displayed when the editor fails to find any maps in the wad being open.

Fixed, Open Map Option window: fixed a crash when switching to a map configuration with long texture names support enabled when the wad being open has no maps (this will probably never happen because of previous change, but let's be on the safe side...).
This commit is contained in:
MaxED 2015-03-18 18:49:46 +00:00
parent 8643d2dd82
commit 8cf084fc41

View file

@ -180,6 +180,14 @@ namespace CodeImp.DoomBuilder.Windows
}
}
//mxd. Bail out if still no dice...
if(config.SelectedIndex == -1)
{
this.Visible = false;
General.ShowWarningMessage("Unable to find maps using any game configuration.\nDoes this wad contain any maps at all?..", MessageBoxButtons.OK);
cancel_Click(this, EventArgs.Empty);
}
// Done
Cursor.Current = Cursors.Default;
}
@ -353,7 +361,7 @@ namespace CodeImp.DoomBuilder.Windows
// Update long texture names checkbox (mxd)
longtexturenames.Enabled = cfg.ReadSetting("longtexturenames", false);
longtexturenames.Checked = longtexturenames.Enabled && options.UseLongTextureNames;
longtexturenames.Checked = (longtexturenames.Enabled && options != null && options.UseLongTextureNames);
}
// OK clicked