/* update the configuration with the received settings */
DLOG("Received bar config update \"%s\"\n", event);
- char *old_command = sstrdup(config.command);
+ char *old_command = config.command ? sstrdup(config.command) : NULL;
bar_display_mode_t old_mode = config.hide_on_modifier;
parse_config_json(event);
if (old_mode != config.hide_on_modifier) {
init_colors(&(config.colors));
/* restart status command process */
- if (strcmp(old_command, config.command) != 0) {
+ if (old_command && strcmp(old_command, config.command) != 0) {
kill_child();
start_child(config.command);
}