From 6342a892975ed990ff416a652706f6775a5f9048 Mon Sep 17 00:00:00 2001 From: bryce Date: Mon, 16 Mar 2020 18:15:31 -0700 Subject: [PATCH] Fix crash when there are no predefined windows Traceback (most recent call last): File "/usr/bin/terminator", line 126, in TERMINATOR.layout_done() File "/usr/share/terminator/terminatorlib/terminator.py", line 395, in layout_done if window not in self.prelayout_windows: TypeError: argument of type 'NoneType' is not iterable fixes: https://bugs.launchpad.net/terminator/+bug/1702369 --- terminatorlib/terminator.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index d50e7ff6..e13d9dc4 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -391,10 +391,11 @@ class Terminator(Borg): # Build list of new windows using prelayout list new_win_list = [] - for window in self.windows: - if window not in self.prelayout_windows: - new_win_list.append(window) - + if self.prelayout_windows: + for window in self.windows: + if window not in self.prelayout_windows: + new_win_list.append(window) + # Make sure all new windows get bumped to the top for window in new_win_list: window.show()