make sure tab is not None either, had a crash because of this
This commit is contained in:
parent
620a966d1e
commit
872cff2ae1
@ -638,7 +638,7 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
if (mode in input_modes and
|
if (mode in input_modes and
|
||||||
config.val.tabs.mode_on_change == 'restore'):
|
config.val.tabs.mode_on_change == 'restore'):
|
||||||
tab = self.currentWidget()
|
tab = self.currentWidget()
|
||||||
if tab != 0:
|
if tab and tab is not None:
|
||||||
tab.data.input_mode = mode
|
tab.data.input_mode = mode
|
||||||
|
|
||||||
@pyqtSlot(usertypes.KeyMode)
|
@pyqtSlot(usertypes.KeyMode)
|
||||||
@ -654,7 +654,7 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
widget.setFocus()
|
widget.setFocus()
|
||||||
elif config.val.tabs.mode_on_change == 'restore':
|
elif config.val.tabs.mode_on_change == 'restore':
|
||||||
tab = self.currentWidget()
|
tab = self.currentWidget()
|
||||||
if tab != 0:
|
if tab and tab is not None:
|
||||||
tab.data.input_mode = usertypes.KeyMode.normal
|
tab.data.input_mode = usertypes.KeyMode.normal
|
||||||
|
|
||||||
@pyqtSlot(int)
|
@pyqtSlot(int)
|
||||||
|
Loading…
Reference in New Issue
Block a user