diff options
Diffstat (limited to 'mktrayicon.c')
-rw-r--r-- | mktrayicon.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mktrayicon.c b/mktrayicon.c index c1eb98d..caf3e85 100644 --- a/mktrayicon.c +++ b/mktrayicon.c @@ -323,8 +323,10 @@ gpointer watch_fifo(gpointer argv) } menusize = 0; - - if (param != NULL && *param == '\0') { + + if(!param) + break; + else if (*param == '\0') { #ifdef DEBUG printf("Removing onmenu handler\n"); #endif @@ -389,7 +391,8 @@ gpointer watch_fifo(gpointer argv) } else { //this is a label-only entry onmenu[item].name = save_word(param, i, last); - onmenu[item].action = "\0"; + onmenu[item].action = malloc(1); // pointer has to be freeable + onmenu[item].action = '\0'; } last = i; lastFound = '|'; @@ -402,7 +405,8 @@ gpointer watch_fifo(gpointer argv) } else{ onmenu[item].name = save_word(param, len, last); - onmenu[item].action = "\0"; + onmenu[item].action = malloc(1); + onmenu[item].action = '\0'; } } |