diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-06-20 04:58:10 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-06-20 04:59:50 +0800 |
commit | d492860ffe395d219cd79e5abff314061517ff45 (patch) | |
tree | 4d15bffc78d293bb634bbb67d26587ee04c7c781 /widgets/misc/e-attachment-handler.c | |
parent | 55588cfc76408f7b42407f9ce4cad0c4ac8ec12a (diff) | |
download | gsoc2013-evolution-d492860ffe395d219cd79e5abff314061517ff45.tar.gz gsoc2013-evolution-d492860ffe395d219cd79e5abff314061517ff45.tar.zst gsoc2013-evolution-d492860ffe395d219cd79e5abff314061517ff45.zip |
Remove a weak pointer when disposing EAttachmentHandler.
Diffstat (limited to 'widgets/misc/e-attachment-handler.c')
-rw-r--r-- | widgets/misc/e-attachment-handler.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/widgets/misc/e-attachment-handler.c b/widgets/misc/e-attachment-handler.c index 0a6ed0505d..303fc33cc2 100644 --- a/widgets/misc/e-attachment-handler.c +++ b/widgets/misc/e-attachment-handler.c @@ -91,6 +91,23 @@ attachment_handler_constructed (GObject *object) } static void +attachment_handler_dispose (GObject *object) +{ + EAttachmentHandlerPrivate *priv; + + priv = E_ATTACHMENT_HANDLER_GET_PRIVATE (object); + + if (priv->view != NULL) { + g_object_remove_weak_pointer ( + G_OBJECT (priv->view), &priv->view); + priv->view = NULL; + } + + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (parent_class)->dispose (object); +} + +static void attachment_handler_class_init (EAttachmentHandlerClass *class) { GObjectClass *object_class; @@ -102,6 +119,7 @@ attachment_handler_class_init (EAttachmentHandlerClass *class) object_class->set_property = attachment_handler_set_property; object_class->get_property = attachment_handler_get_property; object_class->constructed = attachment_handler_constructed; + object_class->dispose = attachment_handler_dispose; g_object_class_install_property ( object_class, |