summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-01-03 16:33:51 +0100
committerGravatar Martin Szulecki2010-01-03 16:33:51 +0100
commit16e7a98fe55cabf471e47fb0d8251eef6631d984 (patch)
treebad282bfac893d9c28f66cf0cd23b36d12f5f5b5
parent6b60c3fbad95f17480c9425d804f4c0fe5cfb2d4 (diff)
downloadsbmanager-16e7a98fe55cabf471e47fb0d8251eef6631d984.tar.gz
sbmanager-16e7a98fe55cabf471e47fb0d8251eef6631d984.tar.bz2
Make sure to unlink a GList before modifing it or it gets cleared
-rw-r--r--src/sbmanager.c2
1 files changed, 2 insertions, 0 deletions
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);