Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Medrano <josmed@microsoft.com>2022-02-21 16:49:18 +0300
committervs-mobiletools-engineering-service2 <valco@microsoft.com>2022-03-01 18:01:15 +0300
commit834eaf62a7bf1cb6a89d423b3148b197cdca84ec (patch)
tree0c81cbad04cdcd9bf94e1458faa027e958d13167
parent5417507c3e076e2703f2cd2cd057aa0cb536a1ff (diff)
Fixes NRE when viewmodel is not set
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/PropertyEditorControl.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/PropertyEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/PropertyEditorControl.cs
index 7899c8c..110b86c 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/PropertyEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/PropertyEditorControl.cs
@@ -129,7 +129,7 @@ namespace Xamarin.PropertyEditing.Mac
ctrl = (view as EditorContainer)?.EditorView?.NativeView as PropertyEditorControl;
}
- if (ctrl != null && !ctrl.viewModel.IsInputEnabled) {
+ if (ctrl?.viewModel != null && !ctrl.viewModel.IsInputEnabled) {
ctrl = null;
}
@@ -158,7 +158,7 @@ namespace Xamarin.PropertyEditing.Mac
ctrl = (view as EditorContainer)?.EditorView?.NativeView as PropertyEditorControl;
}
- if (ctrl != null && !ctrl.viewModel.IsInputEnabled) {
+ if (ctrl?.viewModel != null && !ctrl.viewModel.IsInputEnabled) {
ctrl = null;
}