abrt/0011-cli-do-not-exit-with-segfault-if-dbus-fails.patch
Matej Habrnal 34dad7f6af Automatic reporting from GSettings, Spelling/grammar fixes and another fixes
Resolves: #1217901

Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
2015-05-20 16:00:35 +02:00

31 lines
878 B
Diff

From 82957a3390188509921ec16bddc27f2aeeb01b8d Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Mon, 4 May 2015 10:35:25 +0200
Subject: [PATCH] cli: do not exit with segfault if dbus fails
There was a segfault when we ran 'abrt-cli list' and dbus failed.
Related to rhbz#1217901
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
src/cli/list.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/cli/list.c b/src/cli/list.c
index c0c819d..31d1835 100644
--- a/src/cli/list.c
+++ b/src/cli/list.c
@@ -142,6 +142,8 @@ int cmd_list(int argc, const char **argv)
parse_opts(argc, (char **)argv, program_options, program_usage_string);
vector_of_problem_data_t *ci = fetch_crash_infos();
+ if (ci == NULL)
+ return 1;
g_ptr_array_sort_with_data(ci, &cmp_problem_data, (char *) FILENAME_LAST_OCCURRENCE);
--
2.4.1