]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Correctly check if the workspace already exists
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 3 Aug 2011 10:18:30 +0000 (12:18 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 3 Aug 2011 10:18:30 +0000 (12:18 +0200)
src/randr.c

index 441a0b43bf0e6690be541c53b1a85e8268b68e53..505eb49bcf3ed9509f830f2ff29f9827fc6ad45b 100644 (file)
@@ -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);