forked from shadowfacts/Tusker
Fix potential crash when collapsing w/o selected sidebar item
This commit is contained in:
parent
c737354ed3
commit
daa1a9eef7
|
@ -164,7 +164,10 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
|
|||
}
|
||||
|
||||
// Switch the tab bar to focus the same item as the sidebar has selected
|
||||
switch sidebar.selectedItem! {
|
||||
switch sidebar.selectedItem {
|
||||
case nil:
|
||||
break
|
||||
|
||||
case let .tab(tab):
|
||||
// sidebar items that map 1 <-> 1 can be transferred directly
|
||||
tabBarViewController.select(tab: tab)
|
||||
|
|
Loading…
Reference in New Issue