From 183bfa2d6b27e8a515678dd7c49d057ae262ec3f Mon Sep 17 00:00:00 2001 From: Matej Habrnal Date: Aug 14 2015 14:57:35 +0000 Subject: Correct testing of return values from ABRT D-Bus API wrrapper Resolves: #1245262 Signed-off-by: Matej Habrnal --- diff --git a/0007-Correct-testing-of-return-values-from-ABRT-D-Bus-API.patch b/0007-Correct-testing-of-return-values-from-ABRT-D-Bus-API.patch new file mode 100644 index 0000000..5205b6d --- /dev/null +++ b/0007-Correct-testing-of-return-values-from-ABRT-D-Bus-API.patch @@ -0,0 +1,34 @@ +From fcd6fc2c6511d3bd84172a294617814313b205d0 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Fri, 14 Aug 2015 09:08:22 +0200 +Subject: [PATCH] Correct testing of return values from ABRT D-Bus API wrrapper + +Related: rhbz#1245262 + +Signed-off-by: Jakub Filak +--- + src/gnome_abrt/wrappers/problem_details.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/gnome_abrt/wrappers/problem_details.c b/src/gnome_abrt/wrappers/problem_details.c +index deadf0e..1d0bab9 100644 +--- a/src/gnome_abrt/wrappers/problem_details.c ++++ b/src/gnome_abrt/wrappers/problem_details.c +@@ -29,8 +29,13 @@ PyObject *p_show_problem_details_for_dir(PyObject *module, PyObject *args) + PyGObject *pygtkwnd = NULL; + if (PyArg_ParseTuple(args, "s|O", &dir_str, &pygtkwnd)) + { +- GtkWindow *wnd = pygtkwnd ? GTK_WINDOW(pygtkwnd->obj) : NULL; + problem_data_t *problem_data = get_full_problem_data_over_dbus(dir_str); ++ ++ /* get_full_problem_data_over_dbus() printed an error message */ ++ if (problem_data == ERR_PTR || problem_data == NULL) ++ Py_RETURN_NONE; ++ ++ GtkWindow *wnd = pygtkwnd ? GTK_WINDOW(pygtkwnd->obj) : NULL; + GtkWidget *dialog = problem_details_dialog_new(problem_data, wnd); + + if (dialog != NULL) +-- +2.4.3 + diff --git a/gnome-abrt.spec b/gnome-abrt.spec index 53a7cc0..1ae7314 100644 --- a/gnome-abrt.spec +++ b/gnome-abrt.spec @@ -6,7 +6,7 @@ Name: gnome-abrt Version: 1.0.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A utility for viewing problems that have occurred with the system Group: User Interface/Desktops @@ -20,6 +20,7 @@ Patch0003: 0003-Use-DBus-to-get-problem-data-for-detail-dialog.patch Patch0004: 0004-Enabled-the-Details-also-for-the-System-problems.patch Patch0005: 0005-Fix-an-error-introduced-with-the-details-on-System-p.patch Patch0006: 0006-Let-the-theme-handle-the-colour-in-the-problems-list.patch +Patch0007: 0007-Correct-testing-of-return-values-from-ABRT-D-Bus-API.patch # git is need for '%%autosetup -S git' which automatically applies all the @@ -121,6 +122,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Aug 14 2015 Matej Habrnal - 1.0.0-4 +- Correct testing of return values from ABRT D-Bus API wrrapper +- Resolves: #1245262 + * Mon Jun 22 2015 Matej Habrnal - 1.0.0-3 - dependency fix