From 8126eb8f51454147d8cc3a78bbce8d1363aee5b2 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Thu, 30 Aug 2012 22:01:54 +0000 Subject: [PATCH] Avoid crash on no database loaded when moving to listviews. Unset previous model on change db svn: r20298 --- src/gui/views/listview.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/views/listview.py b/src/gui/views/listview.py index 2becee8ec..d3ee7e67f 100644 --- a/src/gui/views/listview.py +++ b/src/gui/views/listview.py @@ -123,7 +123,11 @@ class ListView(NavigationView): self.connect_signals() def no_database(self): + ## TODO GTK3: This is never called!! Dbguielement disconnects + ## signals on database changed, so it cannot be called + ## Undo part of Revision 20296 if all works good. self.list.set_model(None) + self.model.destroy() self.model = None self.build_tree() @@ -654,6 +658,7 @@ class ListView(NavigationView): """ Called when the database is changed. """ + self.list.set_model(None) self._change_db(db) self.connect_signals()