diff options
Diffstat (limited to 'shell/e-splash.c')
-rw-r--r-- | shell/e-splash.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/shell/e-splash.c b/shell/e-splash.c index c2112eb3af..f56cf7c4e8 100644 --- a/shell/e-splash.c +++ b/shell/e-splash.c @@ -210,17 +210,36 @@ schedule_relayout (ESplash *splash) /* GObject methods. */ static void -impl_finalize (GObject *object) +impl_dispose (GObject *object) { ESplash *splash; ESplashPrivate *priv; - GList *p; splash = E_SPLASH (object); priv = splash->priv; - if (priv->splash_image_pixbuf != NULL) + if (priv->splash_image_pixbuf != NULL) { gdk_pixbuf_unref (priv->splash_image_pixbuf); + priv->splash_image_pixbuf = NULL; + } + + if (priv->layout_idle_id != 0) { + gtk_idle_remove (priv->layout_idle_id); + priv->layout_idle_id = 0; + } + + (* G_OBJECT_CLASS (parent_class)->dispose) (object); +} + +static void +impl_finalize (GObject *object) +{ + ESplash *splash; + ESplashPrivate *priv; + GList *p; + + splash = E_SPLASH (object); + priv = splash->priv; for (p = priv->icons; p != NULL; p = p->next) { Icon *icon; @@ -231,9 +250,6 @@ impl_finalize (GObject *object) g_list_free (priv->icons); - if (priv->layout_idle_id != 0) - gtk_idle_remove (priv->layout_idle_id); - g_free (priv); (* G_OBJECT_CLASS (parent_class)->finalize) (object); @@ -246,6 +262,7 @@ class_init (ESplashClass *klass) GObjectClass *object_class; object_class = G_OBJECT_CLASS (klass); + object_class->dispose = impl_dispose; object_class->finalize = impl_finalize; parent_class = gtk_type_class (gtk_window_get_type ()); |