Check that view exists before calling post_create method
Avoids 'NoneType' object has no attribute 'post_create' error. Fixes #12638
This commit is contained in:
parent
9e81014fc6
commit
0a981f0ca6
@ -842,7 +842,8 @@ class ViewManager(CLIManager):
|
||||
hbox.add(Gtk.Label(label=pdata.name))
|
||||
hbox.show_all()
|
||||
page_num = self.notebook.append_page(page.get_display(), hbox)
|
||||
self.active_page.post_create()
|
||||
if self.active_page:
|
||||
self.active_page.post_create()
|
||||
if not self.file_loaded:
|
||||
self.uimanager.set_actions_visible(self.actiongroup, False)
|
||||
self.uimanager.set_actions_visible(self.readonlygroup, False)
|
||||
|
Loading…
Reference in New Issue
Block a user