Fix exception when cancelling out of a db upgrade in GUI (#1154)

Fixes #12063
This commit is contained in:
Paul Culley 2021-02-19 11:18:18 -06:00 committed by GitHub
parent 670bb355cb
commit 455628d44a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -993,7 +993,8 @@ class ViewManager(CLIManager):
The method called after load of a new database.
Inherit CLI method to add GUI part
"""
self._post_load_newdb_nongui(filename, title)
if self.dbstate.db.is_open():
self._post_load_newdb_nongui(filename, title)
self._post_load_newdb_gui(filename, filetype, title)
def _post_load_newdb_gui(self, filename, filetype, title=None):