Fix crash in MultiColumnNavController due to closing already-removed VC
Not sure how this is possible, but there was a report of it Closes #485
This commit is contained in:
parent
e3c480131a
commit
6c70ed4b4e
|
@ -142,8 +142,8 @@ class MultiColumnNavigationController: UIViewController {
|
|||
}
|
||||
|
||||
fileprivate func closeColumn(_ vc: UIViewController) {
|
||||
let index = viewControllers.firstIndex(of: vc)!
|
||||
guard index > 0 else {
|
||||
guard let index = viewControllers.firstIndex(of: vc),
|
||||
index > 0 else {
|
||||
// Can't close the last column
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue