]> git.sur5r.net Git - i3/i3/commitdiff
tree_append_json: don't focus freed container
authorOrestis Floros <orestisf1993@gmail.com>
Thu, 6 Sep 2018 11:48:21 +0000 (14:48 +0300)
committerOrestis Floros <orestisf1993@gmail.com>
Thu, 6 Sep 2018 11:48:21 +0000 (14:48 +0300)
src/load_layout.c

index add78875bdcc387b6d8258c42b68a8a4eb389d61..5f391ad727ed0da3f3811da91030d87293a813e8 100644 (file)
@@ -632,6 +632,9 @@ void tree_append_json(Con *con, const char *buf, const size_t len, char **errorm
         while (incomplete-- > 0) {
             Con *parent = json_node->parent;
             DLOG("freeing incomplete container %p\n", json_node);
+            if (json_node == to_focus) {
+                to_focus = NULL;
+            }
             con_free(json_node);
             json_node = parent;
         }