mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-19 23:11:03 +00:00
Game Configurations: fixed a crash when no default values for UDMF integer or floating point fields are set
This commit is contained in:
parent
682c4b92bf
commit
6e7eaf0359
2 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ namespace CodeImp.DoomBuilder.Types
|
||||||
|
|
||||||
public override void SetupField(TypeHandlerAttribute attr, UniversalFieldInfo fieldinfo)
|
public override void SetupField(TypeHandlerAttribute attr, UniversalFieldInfo fieldinfo)
|
||||||
{
|
{
|
||||||
defaultvalue = fieldinfo == null ? 0.0 : (double)fieldinfo.Default;
|
defaultvalue = (fieldinfo == null || fieldinfo.Default == null) ? 0.0 : (double)fieldinfo.Default;
|
||||||
base.SetupField(attr, fieldinfo);
|
base.SetupField(attr, fieldinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace CodeImp.DoomBuilder.Types
|
||||||
|
|
||||||
public override void SetupField(TypeHandlerAttribute attr, UniversalFieldInfo fieldinfo)
|
public override void SetupField(TypeHandlerAttribute attr, UniversalFieldInfo fieldinfo)
|
||||||
{
|
{
|
||||||
defaultvalue = fieldinfo == null ? 0 : (int)fieldinfo.Default;
|
defaultvalue = (fieldinfo == null || fieldinfo.Default == null) ? 0 : (int)fieldinfo.Default;
|
||||||
base.SetupField(attr, fieldinfo);
|
base.SetupField(attr, fieldinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue