Skip to content

Commit 7f581fd

Browse files
committed
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'
1 parent 750a9be commit 7f581fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

terminatorlib/terminator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ def layout_done(self):
338338
# For windows without a notebook ensure Terminal is visible and focused
339339
if window_last_active_term_mapping[window]:
340340
term = self.find_terminal_by_uuid(window_last_active_term_mapping[window].urn)
341-
term.ensure_visible_and_focussed()
341+
if term:
342+
term.ensure_visible_and_focussed()
342343

343344
# Build list of new windows using prelayout list
344345
new_win_list = []

0 commit comments

Comments
 (0)