summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOwen Taylor <owt1@cornell.edu>1998-04-09 19:12:12 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-04-09 19:12:12 +0000
commit26df647a0f526f6c17ad2317b146e639e9917613 (patch)
tree43ba2f224c0ff1375f99f19d195e6fbf71c6de96 /tests
parentad7dc0e87f66bc90c2d3a7453ecbf34abe0a17dc (diff)
downloadgtk+-26df647a0f526f6c17ad2317b146e639e9917613.tar.gz
(Found by Mattias.Gronlund" <Mattias.Gronlund@sa.erisoft.se>)
Thu Apr 9 14:24:35 1998 Owen Taylor <owt1@cornell.edu> (Found by Mattias.Gronlund" <Mattias.Gronlund@sa.erisoft.se>) * gtk/gtkcurve.c (gtk_curve_interpolate): Added a missing g_free. * gtk/gtkcurve.c (gtk_curve_graph_events): Limits were off by one, resulting in writing past array bounds. Removed some unused code. * gdk/gdk.c (gdk_dnd_drag_begin): The event structure used for gdk_event_put should be a GdkEvent, not a subtype, since it will all be copied. * gtk/gtkcolorsel.c: Added a unrealize handler that unref's the GC's that were created. * gtk/testgtk.c (clist_warning_test): ref and sink child because it may never be added to anything.
Diffstat (limited to 'tests')
-rw-r--r--tests/testgtk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 8cfd862438..e56fc7073f 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -3076,7 +3076,11 @@ clist_warning_test (GtkWidget *button,
static gboolean add_remove = FALSE;
add_remove = !add_remove;
+
child = gtk_label_new ("Test");
+ gtk_widget_ref (child);
+ gtk_object_sink (child);
+
if (add_remove)
gtk_container_add (GTK_CONTAINER (clist), child);
else
@@ -3085,7 +3089,9 @@ clist_warning_test (GtkWidget *button,
gtk_container_remove (GTK_CONTAINER (clist), child);
child->parent = NULL;
}
+
gtk_widget_destroy (child);
+ gtk_widget_unref (child);
}
static void