From d0f36a17931a6927c8778a994ea5341a0c68b9c1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 22 Apr 2017 21:37:55 -0400 Subject: [PATCH] testlist3: Handle dropping a row onto itself Instead of spewing criticals, we should handle this gracefully by doing nothing. --- tests/testlist3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/testlist3.c b/tests/testlist3.c index 73a8b824fe..5ce5d66c2a 100644 --- a/tests/testlist3.c +++ b/tests/testlist3.c @@ -70,6 +70,9 @@ drag_data_received (GtkWidget *widget, row = (gpointer)* (gpointer*)gtk_selection_data_get_data (selection_data); source = gtk_widget_get_ancestor (row, GTK_TYPE_LIST_BOX_ROW); + if (source == target) + return; + g_object_ref (source); gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (source)), source); gtk_list_box_insert (GTK_LIST_BOX (gtk_widget_get_parent (target)), source, pos);