mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
Added safeguard against crashes related to config disposing. Fixes 251. Fixes 352. Fixes 514.
This commit is contained in:
parent
7b42ba622f
commit
d8d03916ea
1 changed files with 7 additions and 2 deletions
|
@ -232,8 +232,13 @@ namespace CodeImp.DoomBuilder.Config
|
|||
//mxd. Destructor
|
||||
~ConfigurationInfo()
|
||||
{
|
||||
if (thingsfilters != null) foreach(ThingsFilter tf in thingsfilters) tf.Dispose();
|
||||
if (testEngines != null) foreach(EngineInfo ei in testEngines) ei.Dispose();
|
||||
// biwa. There have been crash reports because of null references
|
||||
// https://github.com/jewalky/UltimateDoomBuilder/issues/251
|
||||
// https://github.com/jewalky/UltimateDoomBuilder/issues/352
|
||||
// https://github.com/jewalky/UltimateDoomBuilder/issues/514
|
||||
// Can't reproduce, but add a safeguard anyway.
|
||||
if (thingsfilters != null) foreach(ThingsFilter tf in thingsfilters) if(tf != null) tf.Dispose();
|
||||
if (testEngines != null) foreach(EngineInfo ei in testEngines) if(ei != null) ei.Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue