Skip to content

Commit

Permalink
EnumPropertyEditor throws on ObjectSpaceOnCommitted #330 #341
Browse files Browse the repository at this point in the history
  • Loading branch information
apobekiaris committed Mar 12, 2019
1 parent 22bc9b1 commit 37b4827
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public EnumPropertyEditor(Type objectType, IModelMemberViewItem model)
public override void BreakLinksToControl(bool unwireEventsOnly) {
base.BreakLinksToControl(unwireEventsOnly);
CurrentObjectChanged-=OnCurrentObjectChanged;
_objectSpace.Committed-=ObjectSpaceOnCommitted;
if (_objectSpace != null) _objectSpace.Committed -= ObjectSpaceOnCommitted;
}

bool IsNoneValue(object value) {
Expand All @@ -112,7 +112,7 @@ public EnumPropertyEditor(Type objectType, IModelMemberViewItem model)
}

private void ObjectSpaceOnCommitted(object sender, EventArgs e) {
FilterRepositoryItem((RepositoryItemEnumEdit) Control.Properties);
if (Control != null) FilterRepositoryItem((RepositoryItemEnumEdit) Control.Properties);
}
}
}

0 comments on commit 37b4827

Please sign in to comment.