aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-corba-shortcuts.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-corba-shortcuts.c')
-rw-r--r--shell/e-corba-shortcuts.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/shell/e-corba-shortcuts.c b/shell/e-corba-shortcuts.c
index 6412d9e69d..8ebeeac02a 100644
--- a/shell/e-corba-shortcuts.c
+++ b/shell/e-corba-shortcuts.c
@@ -87,7 +87,7 @@ shortcut_list_to_corba (const GSList *shortcut_list,
/* GObject methods. */
static void
-impl_finalize (GObject *object)
+impl_dispose (GObject *object)
{
ECorbaShortcuts *corba_shortcuts;
ECorbaShortcutsPrivate *priv;
@@ -95,9 +95,22 @@ impl_finalize (GObject *object)
corba_shortcuts = E_CORBA_SHORTCUTS (object);
priv = corba_shortcuts->priv;
- g_object_unref (priv->shortcuts);
+ if (priv->shortcuts != NULL) {
+ g_object_unref (priv->shortcuts);
+ priv->shortcuts = NULL;
+ }
+
+ (* G_OBJECT_CLASS (parent_class)->dispose) (object);
+}
+
+static void
+impl_finalize (GObject *object)
+{
+ ECorbaShortcuts *corba_shortcuts;
+
+ corba_shortcuts = E_CORBA_SHORTCUTS (object);
- g_free (priv);
+ g_free (corba_shortcuts->priv);
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
@@ -286,6 +299,7 @@ class_init (GObjectClass *object_class)
parent_class = gtk_type_class (PARENT_TYPE);
+ object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;
corba_shortcuts_class = E_CORBA_SHORTCUTS_CLASS (object_class);