summaryrefslogtreecommitdiffstats
path: root/macosx/HBQueueTableViewController.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-08-12 10:19:00 +0200
committerDamiano Galassi <[email protected]>2019-08-12 10:19:00 +0200
commitc5a4d181ebedbdee2bdfefeffa28128d0b9c95c1 (patch)
tree635e3d036b7065987f29d38489838ceb6cdd11eb /macosx/HBQueueTableViewController.m
parent76d08e5d4bb6287de03519cf43cc298d2d896a7a (diff)
MacGui: enable and fix more warnings. Review nullability annotations.
Diffstat (limited to 'macosx/HBQueueTableViewController.m')
-rw-r--r--macosx/HBQueueTableViewController.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/macosx/HBQueueTableViewController.m b/macosx/HBQueueTableViewController.m
index 2f3931c8e..034e03487 100644
--- a/macosx/HBQueueTableViewController.m
+++ b/macosx/HBQueueTableViewController.m
@@ -17,9 +17,9 @@
@property (nonatomic, weak, readonly) HBQueue *queue;
@property (nonatomic) NSArray<HBQueueItem *> *dragNodesArray;
-@property (strong) id<HBQueueTableViewControllerDelegate> delegate;
+@property (nonatomic, strong) id<HBQueueTableViewControllerDelegate> delegate;
-@property (weak) IBOutlet HBTableView *tableView;
+@property (nonatomic, weak) IBOutlet HBTableView *tableView;
@end
@@ -266,7 +266,7 @@
[self removeSelectedQueueItem:tableView];
}
-- (BOOL)tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard;
+- (BOOL)tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard
{
NSArray<HBQueueItem *> *items = [self.queue.items objectsAtIndexes:rowIndexes];
// Dragging is only allowed of the pending items.
@@ -297,7 +297,7 @@
// We do not let the user drop a pending item before or *above*
// already finished or currently encoding items.
- NSInteger encodingRow = [self.queue.items indexOfObject:self.queue.currentItem];
+ NSInteger encodingRow = self.queue.currentItem ? [self.queue.items indexOfObject:self.queue.currentItem] : NSNotFound;
if (encodingRow != NSNotFound && row <= encodingRow)
{
return NSDragOperationNone;