summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2014-12-14 12:51:12 +0300
committerStefano Karapetsas <[email protected]>2015-03-24 08:30:33 +0100
commit08f3c83f8437c9f08990a2a7f6ea818d303c7b3f (patch)
tree372170944221e7ec7687cd907111838c35ca9c2a
parent8c6149ee76a5f4b8535c1c3fb2314b27b35e8b61 (diff)
downloadmate-session-manager-08f3c83f8437c9f08990a2a7f6ea818d303c7b3f.tar.bz2
mate-session-manager-08f3c83f8437c9f08990a2a7f6ea818d303c7b3f.tar.xz
avoid dereferencing NULL pointer
-rw-r--r--mate-session/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mate-session/main.c b/mate-session/main.c
index 63cc5fc..f5f5734 100644
--- a/mate-session/main.c
+++ b/mate-session/main.c
@@ -249,15 +249,16 @@ static void append_required_apps(GsmManager* manager)
{
g_warning("No required applications specified");
}
-
- for (i = 0; required_components[i]; i++)
+ else
{
+ for (i = 0; required_components[i]; i++)
+ {
char* default_provider;
const char* component;
if (IS_STRING_EMPTY((char*) required_components[i]))
{
- continue;
+ continue;
}
component = required_components[i];
@@ -285,6 +286,7 @@ static void append_required_apps(GsmManager* manager)
}
g_free(default_provider);
+ }
}
g_debug("main: *** Done adding required apps");