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); }