Commit 0d2d1904 authored by Olivier Brunel's avatar Olivier Brunel Committed by Matthias Clasen

treestore: Fix segfault when reordering non-existing children

Calling gtk_tree_store_reorder() on a node without children would cause a
segfault; Fixes Olivier Brunel's avatarOlivier Brunel <>
parent 75c22332
......@@ -2280,6 +2280,12 @@ gtk_tree_store_reorder (GtkTreeStore *tree_store,
level = G_NODE (parent->user_data)->children;
if (G_UNLIKELY (!level))
g_warning ("%s: Cannot reorder, parent has no children", G_STRLOC);
/* count nodes */
node = level;
while (node)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment