[gnome-builder] util: ensure we hold a reference on widget for destroy callback
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] util: ensure we hold a reference on widget for destroy callback
- Date: Wed, 17 Dec 2014 10:47:27 +0000 (UTC)
commit c841231911e434dea2df857bc482928bdf3c5846
Author: Christian Hergert <christian hergert me>
Date: Mon Dec 15 15:03:12 2014 -0800
util: ensure we hold a reference on widget for destroy callback
src/util/gb-widget.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/util/gb-widget.c b/src/util/gb-widget.c
index a3d2a75..b6d2793 100644
--- a/src/util/gb-widget.c
+++ b/src/util/gb-widget.c
@@ -163,6 +163,7 @@ hide_callback (gpointer data)
gtk_widget_hide (widget);
gtk_widget_set_opacity (widget, 1.0);
+ g_object_unref (widget);
}
void
@@ -180,7 +181,7 @@ gb_widget_fade_hide (GtkWidget *widget)
1000,
frame_clock,
hide_callback,
- widget,
+ g_object_ref (widget),
"opacity", 0.0,
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]