summaryrefslogtreecommitdiffstats
path: root/src/cli/CLI.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-11-24 12:29:24 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2010-11-24 12:29:24 +0100
commit47e3c252bf20cb8acb5605ee1c1ae0dbe9642769 (patch)
tree3f2e7c74fbc299426f584f5580c355ec0ce9473a /src/cli/CLI.cpp
parent8d0f81ba4a250ee139c82b592e6e8e6876782afc (diff)
downloadabrt-47e3c252bf20cb8acb5605ee1c1ae0dbe9642769.tar.gz
abrt-47e3c252bf20cb8acb5605ee1c1ae0dbe9642769.tar.xz
abrt-47e3c252bf20cb8acb5605ee1c1ae0dbe9642769.zip
abrt-cli: dont die if message element is missing in the dump dir
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/cli/CLI.cpp')
-rw-r--r--src/cli/CLI.cpp8
1 files changed, 6 insertions, 2 deletions
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);