Fix bug that could cause a crash when an invalid indexPath was used to find a node in the shadow table
This commit is contained in:
parent
7f024586bb
commit
1ba60e2846
|
@ -344,7 +344,7 @@ class AppCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
func nodeFor(_ indexPath: IndexPath) -> Node? {
|
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 nil
|
||||||
}
|
}
|
||||||
return shadowTable[indexPath.section][indexPath.row]
|
return shadowTable[indexPath.section][indexPath.row]
|
||||||
|
|
Loading…
Reference in New Issue