Jakub Filak
2013-09-13 09:04:00 UTC
Closes rhbz#1005472
Signed-off-by: Jakub Filak <jfilak-H+wXaHxf7aLQT0dZR+***@public.gmane.org>
---
src/gnome_abrt/views.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/gnome_abrt/views.py b/src/gnome_abrt/views.py
index 1d7ddb9..dfea616 100644
--- a/src/gnome_abrt/views.py
+++ b/src/gnome_abrt/views.py
@@ -497,6 +497,15 @@ class OopsWindow(Gtk.ApplicationWindow):
if storage_problems:
model = self._builder.tv_problems.get_model()
+
+ # For some strange reason, get_model() sometimes returns None when
+ # this function is called from a signal handler but the signal
+ # handler is synchronously called from GMainLoop so there is no
+ # place for race conditions. If the described situation arises,
+ # base model will be used.
+ if model is None:
+ model = self._builder.ls_problems
+
pit = None
if old_selection:
pit = self._find_problem_iter(old_selection[0], model)
Signed-off-by: Jakub Filak <jfilak-H+wXaHxf7aLQT0dZR+***@public.gmane.org>
---
src/gnome_abrt/views.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/gnome_abrt/views.py b/src/gnome_abrt/views.py
index 1d7ddb9..dfea616 100644
--- a/src/gnome_abrt/views.py
+++ b/src/gnome_abrt/views.py
@@ -497,6 +497,15 @@ class OopsWindow(Gtk.ApplicationWindow):
if storage_problems:
model = self._builder.tv_problems.get_model()
+
+ # For some strange reason, get_model() sometimes returns None when
+ # this function is called from a signal handler but the signal
+ # handler is synchronously called from GMainLoop so there is no
+ # place for race conditions. If the described situation arises,
+ # base model will be used.
+ if model is None:
+ model = self._builder.ls_problems
+
pit = None
if old_selection:
pit = self._find_problem_iter(old_selection[0], model)
--
1.8.3.1
1.8.3.1