mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 17:29:23 +00:00
Fix crash with -1 row indexes. Fix #4861.
This commit is contained in:
1 parent
fcc35aecfc
commit
ae575b73f1
1 file changed
+8
-2
@@ -118,7 +118,10 @@ extension Notification.Name {
|
||||
func selectFeedsVisitor(node: Node) {
|
||||
if let feedID = (node.representedObject as? SidebarItemIdentifiable)?.sidebarItemID {
|
||||
if selectedFeedIdentifers.contains(feedID) {
|
||||
selectIndexes.insert(outlineView.row(forItem: node) )
|
||||
let row = outlineView.row(forItem: node)
|
||||
if row >= 0 {
|
||||
selectIndexes.insert(row)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,7 +157,10 @@ extension Notification.Name {
|
||||
func selectFeedsVisitor(node: Node) {
|
||||
if let sidebarItemID = (node.representedObject as? SidebarItemIdentifiable)?.sidebarItemID {
|
||||
if selectedFeedIdentifiers.contains(sidebarItemID) {
|
||||
selectIndexes.insert(outlineView.row(forItem: node) )
|
||||
let row = outlineView.row(forItem: node)
|
||||
if row >= 0 {
|
||||
selectIndexes.insert(row)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user