From: Michael Stapelberg Date: Wed, 3 Aug 2011 10:18:30 +0000 (+0200) Subject: Bugfix: Correctly check if the workspace already exists X-Git-Tag: 4.0.2~64^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9800d5286fed352249f06bf1aef6a7a55ab514ec;p=i3%2Fi3 Bugfix: Correctly check if the workspace already exists --- diff --git a/src/randr.c b/src/randr.c index 441a0b43..505eb49b 100644 --- a/src/randr.c +++ b/src/randr.c @@ -387,6 +387,7 @@ void init_ws_for_output(Output *output, Con *content) { ws->name[strlen(ws->name)-1] = '\0'; DLOG("trying name *%s*\n", ws->name); + current = NULL; TAILQ_FOREACH(out, &(croot->nodes_head), nodes) GREP_FIRST(current, output_get_content(out), !strcasecmp(child->name, ws->name)); @@ -404,6 +405,7 @@ void init_ws_for_output(Output *output, Con *content) { FREE(ws->name); asprintf(&(ws->name), "%d", c); + current = NULL; TAILQ_FOREACH(out, &(croot->nodes_head), nodes) GREP_FIRST(current, output_get_content(out), !strcasecmp(child->name, ws->name)); exists = (current != NULL);