mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-03 18:56:14 +00:00
Guard against negative numbers. Fixes #3768
This commit is contained in:
1 parent
6c7b425af3
commit
53f835b3ce
1 file changed
+4
-1
@@ -657,7 +657,10 @@ class SceneCoordinator: NSObject, UndoableCommandRunner {
|
||||
}
|
||||
|
||||
func nodeFor(_ indexPath: IndexPath) -> Node? {
|
||||
guard indexPath.section < shadowTable.count && indexPath.row < shadowTable[indexPath.section].feedNodes.count else {
|
||||
guard indexPath.section > -1 &&
|
||||
indexPath.row > -1 &&
|
||||
indexPath.section < shadowTable.count &&
|
||||
indexPath.row < shadowTable[indexPath.section].feedNodes.count else {
|
||||
return nil
|
||||
}
|
||||
return shadowTable[indexPath.section].feedNodes[indexPath.row].node
|
||||
|
||||
Reference in new issue
Block a user