Commit de594b62 authored by Victor Ananjevsky's avatar Victor Ananjevsky

add more checks in notification input parsing

parent f14f5fc4
...@@ -346,7 +346,8 @@ handle_stdin (GIOChannel * channel, GIOCondition condition, gpointer data) ...@@ -346,7 +346,8 @@ handle_stdin (GIOChannel * channel, GIOCondition condition, gpointer data)
else if (!g_ascii_strcasecmp (command, "action")) else if (!g_ascii_strcasecmp (command, "action"))
{ {
g_free (action); g_free (action);
if (value) action = NULL;
if (value && *value)
action = g_strdup (value); action = g_strdup (value);
} }
else if (!g_ascii_strcasecmp (command, "quit")) else if (!g_ascii_strcasecmp (command, "quit"))
...@@ -356,7 +357,7 @@ handle_stdin (GIOChannel * channel, GIOCondition condition, gpointer data) ...@@ -356,7 +357,7 @@ handle_stdin (GIOChannel * channel, GIOCondition condition, gpointer data)
} }
else if (!g_ascii_strcasecmp (command, "menu")) else if (!g_ascii_strcasecmp (command, "menu"))
{ {
if (value) if (value && *value)
parse_menu_str (value); parse_menu_str (value);
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment