[maemo-developers] Patch to fix a hildon-1 bug
From: Zhu, Peter J peter.j.zhu at intel.comDate: Wed Jul 25 11:26:24 EEST 2007
- Previous message: Alarm API: Recurrence
- Next message: sbox2 & maemo
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
Here I send a patch at end of this mail to fix a hildon-1 bug that will
cause program crash as hildon window is destroied in some
cases(Specially in case it returns FALSE in the delete-event processing
of
that window).
Basically, the GtkBorder widget should be freed with gtk_border_free()
rather than using g_free if it's NOT created by g_malloc.
diff --git a/src/hildon-window.c b/src/hildon-window.c
index 1f1fac6..6e67057 100644
--- a/src/hildon-window.c
+++ b/src/hildon-window.c
@@ -380,9 +380,9 @@ hildon_window_finalize
(GObject * o
self = HILDON_WINDOW (obj_self);
- g_free (priv->borders);
- g_free (priv->toolbar_borders);
-
+ gtk_border_free(priv->borders);
+ gtk_border_free(priv->toolbar_borders);
+
if (G_OBJECT_CLASS (parent_class)->finalize)
G_OBJECT_CLASS (parent_class)->finalize (obj_self);
@@ -488,6 +488,8 @@ hildon_window_get_borders
(HildonWindo
g_free (priv->borders);
g_free (priv->toolbar_borders);
+ priv->borders = NULL;
+ priv->toolbar_borders = NULL;
gtk_widget_style_get (GTK_WIDGET (window),
"borders",&priv->borders,
"toolbar-borders", &priv->toolbar_borders,
Peter
- Previous message: Alarm API: Recurrence
- Next message: sbox2 & maemo
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
