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:
authorDominique Louis <dolouis@microsoft.com>2020-08-26 23:14:21 +0300
committerGitHub <noreply@github.com>2020-08-26 23:14:21 +0300
commitc14fc8c90ae0575056075dfaf40726fef197851b (patch)
treeb78cf5b50c9a0663c49a56c1b71862c9157cdc29
parent4690475392176bd3ca6476faa89b3b4320d24959 (diff)
If our control hasn't been created yet, let's skip the check. (#755)
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/CollectionEditorControl.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/CollectionEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/CollectionEditorControl.cs
index 9726187..51a0f8a 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/CollectionEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/CollectionEditorControl.cs
@@ -466,9 +466,12 @@ namespace Xamarin.PropertyEditing.Mac
private void OnSuggestedTypesChanged (object sender, NotifyCollectionChangedEventArgs e)
{
+ if (this.typeSelector == null)
+ return;
+
this.typeSelector.RemoveAll ();
- foreach (ITypeInfo type in ViewModel.SuggestedTypes) {
+ foreach (ITypeInfo type in ViewModel?.SuggestedTypes) {
this.typeSelector.Add (new NSString (type.Name));
}
}