diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-25 11:33:05 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-25 11:33:05 (EDT) |
commit | a13e7d670db70a3073633d4894015c2053018dc9 (patch) | |
tree | 827afae7680bbdde7ea0e31534d6ddeafc6faf3d /src | |
parent | 0de448b5d5236226290e2ab78b0caa0bec561c47 (diff) | |
download | marquee-a13e7d670db70a3073633d4894015c2053018dc9.zip marquee-a13e7d670db70a3073633d4894015c2053018dc9.tar.gz marquee-a13e7d670db70a3073633d4894015c2053018dc9.tar.bz2 |
mq_notebook_remove_page(): Destroy widgets after updating positions
Fixes uses after free and warnings and errors from GLib and GTK+.
Diffstat (limited to 'src')
-rw-r--r-- | src/notebook.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/notebook.c b/src/notebook.c index f646b1a..b4e2864 100644 --- a/src/notebook.c +++ b/src/notebook.c @@ -423,14 +423,14 @@ mq_notebook_remove_page(MqNotebook *notebook, MqTabPage *page) { find_node(notebook, page); - gtk_notebook_remove_page(GTK_NOTEBOOK(notebook), - mq_tree_position(notebook->found_node) - 1); - mq_tree_remove_allocated(MQ_TREE(notebook->found_node)); mq_tree_foreach_from(MQ_TREE(notebook->found_node), update_position, NULL); + gtk_notebook_remove_page(GTK_NOTEBOOK(notebook), + mq_tree_position(notebook->found_node)); + g_free(notebook->found_node); } |