From 16e7a98fe55cabf471e47fb0d8251eef6631d984 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sun, 3 Jan 2010 16:33:51 +0100 Subject: Make sure to unlink a GList before modifing it or it gets cleared --- src/sbmanager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sbmanager.c b/src/sbmanager.c index a2b91bb..bb3cad8 100644 --- a/src/sbmanager.c +++ b/src/sbmanager.c @@ -879,7 +879,9 @@ static gboolean stage_motion_cb(ClutterActor *actor, ClutterMotionEvent *event, int count = g_list_length(sbpages); for (i = 0; i < count; i++) { pageitems = g_list_nth_data(sbpages, i); + sbpages = g_list_remove(sbpages, pageitems); pageitems = g_list_remove(pageitems, selected_item); + sbpages = g_list_insert(sbpages, pageitems, i); } pageitems = g_list_nth_data(sbpages, p); sbpages = g_list_remove(sbpages, pageitems); -- cgit v1.1-32-gdbae