Blame 0008-applet-do-not-crash-if-the-new-problem-has-no-comman.patch
|
Jakub Filak |
c83982 |
From cdc5824e4488d419616cdfaa87ac5f6cf2a4dfea Mon Sep 17 00:00:00 2001
|
|
Jakub Filak |
c83982 |
From: Jakub Filak <jfilak@redhat.com>
|
|
Jakub Filak |
c83982 |
Date: Fri, 17 Jul 2015 10:42:01 +0200
|
|
Jakub Filak |
c83982 |
Subject: [PATCH] applet: do not crash if the new problem has no command_line
|
|
Jakub Filak |
c83982 |
|
|
Jakub Filak |
c83982 |
Related: rhbz#1243791
|
|
Jakub Filak |
c83982 |
|
|
Jakub Filak |
c83982 |
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
Jakub Filak |
c83982 |
---
|
|
Jakub Filak |
c83982 |
src/applet/applet.c | 6 +++++-
|
|
Jakub Filak |
c83982 |
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
Jakub Filak |
c83982 |
|
|
Jakub Filak |
c83982 |
diff --git a/src/applet/applet.c b/src/applet/applet.c
|
|
Jakub Filak |
c83982 |
index 296e1b4..5bdedc1 100644
|
|
Jakub Filak |
c83982 |
--- a/src/applet/applet.c
|
|
Jakub Filak |
c83982 |
+++ b/src/applet/applet.c
|
|
Jakub Filak |
c83982 |
@@ -661,7 +661,11 @@ static void notify_problem_list(GList *problems)
|
|
Jakub Filak |
c83982 |
app = problem_create_app_from_env (problem_info_get_env(pi), problem_info_get_pid(pi));
|
|
Jakub Filak |
c83982 |
|
|
Jakub Filak |
c83982 |
if (!app)
|
|
Jakub Filak |
c83982 |
- app = problem_create_app_from_cmdline (problem_info_get_command_line(pi));
|
|
Jakub Filak |
c83982 |
+ {
|
|
Jakub Filak |
c83982 |
+ const char *const cmd_line = problem_info_get_command_line(pi);
|
|
Jakub Filak |
c83982 |
+ if (cmd_line != NULL)
|
|
Jakub Filak |
c83982 |
+ app = problem_create_app_from_cmdline(cmd_line);
|
|
Jakub Filak |
c83982 |
+ }
|
|
Jakub Filak |
c83982 |
|
|
Jakub Filak |
c83982 |
/* For each problem we'll need to know:
|
|
Jakub Filak |
c83982 |
* - Whether or not the crash happened in an “app”
|
|
Jakub Filak |
c83982 |
--
|
|
Jakub Filak |
c83982 |
2.4.3
|
|
Jakub Filak |
c83982 |
|