tree_append_json: don't focus freed container

next
Orestis Floros 2018-09-06 14:48:21 +03:00
parent cb6da7169a
commit e8d2b9b7b5
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
1 changed files with 3 additions and 0 deletions

View 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;
}