Disabled some error handling that was throwing errors erroneously

This commit is contained in:
2025-05-22 11:36:35 -04:00
parent 5356e1a541
commit 3fde352a15

View File

@@ -4,12 +4,12 @@
{
public void SetProperty<T>(ref T storage, T value, string name)
{
if (storage == null)
throw new InvalidCastException("osrs_toolbox.ModelBase.UpdateProperty\nStorage cannot be null.");
//if (storage == null)
//throw new InvalidCastException("osrs_toolbox.ModelBase.UpdateProperty\nStorage cannot be null.");
if (value == null)
throw new InvalidCastException("osrs_toolbox.ModelBase.UpdateProperty\nValue cannot be null.");
if (storage.GetType() != value.GetType())
throw new InvalidCastException("osrs_toolbox.ModelBase.UpdateProperty\nVariable type mismatch between storage and value.");
//if (storage.GetType() != value.GetType())
//throw new InvalidCastException("osrs_toolbox.ModelBase.UpdateProperty\nVariable type mismatch between storage and value.");
storage = value;
OnPropertyChanged(name);
}