From 47e3c252bf20cb8acb5605ee1c1ae0dbe9642769 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 24 Nov 2010 12:29:24 +0100 Subject: abrt-cli: dont die if message element is missing in the dump dir Signed-off-by: Denys Vlasenko --- src/cli/CLI.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/cli/CLI.cpp') diff --git a/src/cli/CLI.cpp b/src/cli/CLI.cpp index 6ef5b1e9..44271329 100644 --- a/src/cli/CLI.cpp +++ b/src/cli/CLI.cpp @@ -75,8 +75,12 @@ static void print_crash_list(const vector_map_crash_data_t& crash_list, bool inc for (unsigned i = 0; i < crash_list.size(); ++i) { const map_crash_data_t& crash = crash_list[i]; - if (get_crash_data_item_content(crash, FILENAME_MESSAGE) != "" && !include_reported) - continue; + if (!include_reported) + { + const char *msg = get_crash_data_item_content_or_NULL(crash, FILENAME_MESSAGE); + if (!msg || !msg[0]) + continue; + } printf("%u.\n", i); print_crash(crash); -- cgit