From 1ba60e2846e166b17fa30a0298fdcf0b33c59d09 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 23 Aug 2019 13:23:13 -0500 Subject: [PATCH] Fix bug that could cause a crash when an invalid indexPath was used to find a node in the shadow table --- iOS/AppCoordinator.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iOS/AppCoordinator.swift b/iOS/AppCoordinator.swift index a76490f60..baf6b6c88 100644 --- a/iOS/AppCoordinator.swift +++ b/iOS/AppCoordinator.swift @@ -344,7 +344,7 @@ class AppCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider { } func nodeFor(_ indexPath: IndexPath) -> Node? { - guard indexPath.section < shadowTable.count || indexPath.row < shadowTable[indexPath.section].count else { + guard indexPath.section < shadowTable.count && indexPath.row < shadowTable[indexPath.section].count else { return nil } return shadowTable[indexPath.section][indexPath.row]