[empathy] location_manager_dispose: chain up to the parent's dispose, not the parent's finalize
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] location_manager_dispose: chain up to the parent's dispose, not the parent's finalize
- Date: Wed, 7 Apr 2010 12:43:46 +0000 (UTC)
commit 280cd635f51af340e13b81dde87241b75484b8f1
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Wed Apr 7 13:40:22 2010 +0100
location_manager_dispose: chain up to the parent's dispose, not the parent's finalize
This leads to crashes when other code is relying on weak reference
notifications happening in the right order.
libempathy-gtk/empathy-location-manager.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
index 4ef27db..0422f5c 100644
--- a/libempathy-gtk/empathy-location-manager.c
+++ b/libempathy-gtk/empathy-location-manager.c
@@ -98,6 +98,8 @@ static void
location_manager_dispose (GObject *object)
{
EmpathyLocationManagerPriv *priv = GET_PRIV (object);
+ void (*dispose) (GObject *) =
+ G_OBJECT_CLASS (empathy_location_manager_parent_class)->dispose;
if (priv->account_manager != NULL)
{
@@ -129,7 +131,8 @@ location_manager_dispose (GObject *object)
priv->location = NULL;
}
- G_OBJECT_CLASS (empathy_location_manager_parent_class)->finalize (object);
+ if (dispose != NULL)
+ dispose (object);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]