]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkwidget.c
gtk_widget_on_frame_clock_update: ref the widget
[~andy/gtk] / gtk / gtkwidget.c
index 8a7fb18f699bbc7ae6af282aa8c10b3bf5c45906..bafee84aeafcd13719a3487fe7ae263063b3e38f 100644 (file)
@@ -4577,6 +4577,8 @@ gtk_widget_on_frame_clock_update (GdkFrameClock *frame_clock,
   GtkWidgetPrivate *priv = widget->priv;
   GList *l;
 
+  g_object_ref (widget);
+
   for (l = priv->tick_callbacks; l;)
     {
       GtkTickCallbackInfo *info = l->data;
@@ -4597,6 +4599,8 @@ gtk_widget_on_frame_clock_update (GdkFrameClock *frame_clock,
       unref_tick_callback_info (widget, info, l);
       l = next;
     }
+
+  g_object_unref (widget);
 }
 
 static guint tick_callback_id;