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,10 +213,13 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
NSInteger row = self.windowAssociationsTableView.selectedRow; NSInteger row = self.windowAssociationsTableView.selectedRow;
if(row > - 1 && row < self.representedEntry.autotype.associations.count) { if(row > - 1 && row < self.representedEntry.autotype.associations.count) {
[self.observer willChangeModelProperty]; [self.observer willChangeModelProperty];
[self.representedEntry.autotype removeAssociation:self.representedEntry.autotype.associations[row]]; KPKWindowAssociation *association = self.representedEntry.autotype.associations[row];
if(association) {
[self.representedEntry.autotype removeAssociation:association];
[self.observer didChangeModelProperty]; [self.observer didChangeModelProperty];
} }
} }
}
- (void)toggleQuicklookPreview:(id)sender { - (void)toggleQuicklookPreview:(id)sender {
if([QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible]) { if([QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible]) {