From 3fde352a15f841077e841ed00f2ba028792280f2 Mon Sep 17 00:00:00 2001 From: Kalakoi Date: Thu, 22 May 2025 11:36:35 -0400 Subject: [PATCH] Disabled some error handling that was throwing errors erroneously --- osrs-toolbox/MVVM/ModelBase.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osrs-toolbox/MVVM/ModelBase.cs b/osrs-toolbox/MVVM/ModelBase.cs index 79a7ee2..90fde97 100644 --- a/osrs-toolbox/MVVM/ModelBase.cs +++ b/osrs-toolbox/MVVM/ModelBase.cs @@ -4,12 +4,12 @@ { public void SetProperty(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); }