From: Orestis Floros Date: Thu, 6 Sep 2018 11:48:21 +0000 (+0300) Subject: tree_append_json: don't focus freed container X-Git-Tag: 4.16~45^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e8d2b9b7b53b12f81d019b856c54ed2225ec820c;p=i3%2Fi3 tree_append_json: don't focus freed container --- diff --git a/src/load_layout.c b/src/load_layout.c index add78875..5f391ad7 100644 --- a/src/load_layout.c +++ b/src/load_layout.c @@ -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; }