fixed wrong usage of non-null API

This commit is contained in:
michael starke
2016-10-06 17:14:25 +02:00
parent f21ddb1c3a
commit aa42b8f1d3

View File

@@ -213,8 +213,11 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
NSInteger row = self.windowAssociationsTableView.selectedRow;
if(row > - 1 && row < self.representedEntry.autotype.associations.count) {
[self.observer willChangeModelProperty];
[self.representedEntry.autotype removeAssociation:self.representedEntry.autotype.associations[row]];
[self.observer didChangeModelProperty];
KPKWindowAssociation *association = self.representedEntry.autotype.associations[row];
if(association) {
[self.representedEntry.autotype removeAssociation:association];
[self.observer didChangeModelProperty];
}
}
}