fix traceback in layout_done

Got this while testing layouts.  Easy fix

Traceback (most recent call last):
  File "/home/mattrose/Code/terminator/./terminator", line 137, in <module>
    TERMINATOR.layout_done()
  File "/home/mattrose/Code/terminator/terminatorlib/terminator.py", line 341, in layout_done
    term.ensure_visible_and_focussed()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ensure_visible_and_focussed'
This commit is contained in:
Matt Rose 2024-02-15 22:16:33 -05:00
parent 750a9be85a
commit 7f581fde86
1 changed files with 2 additions and 1 deletions

View File

@ -338,7 +338,8 @@ class Terminator(Borg):
# For windows without a notebook ensure Terminal is visible and focused
if window_last_active_term_mapping[window]:
term = self.find_terminal_by_uuid(window_last_active_term_mapping[window].urn)
term.ensure_visible_and_focussed()
if term:
term.ensure_visible_and_focussed()
# Build list of new windows using prelayout list
new_win_list = []