From 76aa439746279f0c00b46ce71e3107a21f3620e8 Mon Sep 17 00:00:00 2001 From: Matej Habrnal Date: Aug 14 2015 09:56:53 +0000 Subject: Correct testing of return values from ABRT D-Bus API wrrapper Signed-off-by: Matej Habrnal --- diff --git a/0005-Correct-testing-of-return-values-from-ABRT-D-Bus-API.patch b/0005-Correct-testing-of-return-values-from-ABRT-D-Bus-API.patch new file mode 100644 index 0000000..ba3ee06 --- /dev/null +++ b/0005-Correct-testing-of-return-values-from-ABRT-D-Bus-API.patch @@ -0,0 +1,34 @@ +From c59ff81a78da68eaabc9b2a2a20e2539147fcc61 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 fd7e002..2da5883 100644 --- a/gnome-abrt.spec +++ b/gnome-abrt.spec @@ -6,7 +6,7 @@ Name: gnome-abrt Version: 1.2.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A utility for viewing problems that have occurred with the system Group: User Interface/Desktops @@ -20,6 +20,8 @@ Patch0001: 0001-Remove-the-Details-button-from-the-top-bar-in-non-GN.patch Patch0002: 0002-Use-UTF-8-encoding-when-working-with-user-files.patch Patch0003: 0003-Fix-loading-applicaton-icons.patch Patch0004: 0004-Fix-an-exception-when-searching-for-a-bug-ID.patch +Patch0005: 0005-Correct-testing-of-return-values-from-ABRT-D-Bus-API.patch + # git is need for '%%autosetup -S git' which automatically applies all the # patches above. Please, be aware that the patches must be generated @@ -124,6 +126,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Aug 14 2015 Matej Habrnal - 1.2.0-5 +- Correct testing of return values from ABRT D-Bus API wrrapper + * Mon Jul 13 2015 Jakub Filak - 1.2.0-4 - Fix loading applicaton icons - Fix an exception when searching for a bug ID