From decd21e15f716ad6abdf92eab4112ecf11bdb4e3 Mon Sep 17 00:00:00 2001 From: Matt Rose Date: Mon, 15 Jun 2020 20:59:09 -0400 Subject: [PATCH] dont traceback if we cant find a last active term --- terminatorlib/notebook.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/terminatorlib/notebook.py b/terminatorlib/notebook.py index 55266e28..52e70b9e 100644 --- a/terminatorlib/notebook.py +++ b/terminatorlib/notebook.py @@ -492,7 +492,9 @@ class Notebook(Container, Gtk.Notebook): tabs_last_active_term = data['tabs_last_active_term'] if tabs_last_active_term: term = self.terminator.find_terminal_by_uuid(tabs_last_active_term.urn) - GObject.idle_add(term.ensure_visible_and_focussed) + # if we can't find a last active term we must be starting up + if term is not None: + GObject.idle_add(term.ensure_visible_and_focussed) return True def on_scroll_event(self, notebook, event):