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 https://bugzilla.gnome.org/show_bug.cgi?id=698396Signed-off-by: Olivier Brunel's avatarOlivier Brunel <jjk@jjacky.com>
parent 75c22332
......@@ -2280,6 +2280,12 @@ gtk_tree_store_reorder (GtkTreeStore *tree_store,
else
level = G_NODE (parent->user_data)->children;
if (G_UNLIKELY (!level))
{
g_warning ("%s: Cannot reorder, parent has no children", G_STRLOC);
return;
}
/* 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