aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-06-20 04:58:10 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-06-20 04:58:10 +0800
commit94ec01deda562c323ead315c4ea48043db68b8d0 (patch)
treee038a6726566ebbf409aaf50a9c1378f662a87e4 /widgets
parentc6911b3029629f1032dd594249c099d79efe9fe1 (diff)
downloadgsoc2013-evolution-94ec01deda562c323ead315c4ea48043db68b8d0.tar
gsoc2013-evolution-94ec01deda562c323ead315c4ea48043db68b8d0.tar.gz
gsoc2013-evolution-94ec01deda562c323ead315c4ea48043db68b8d0.tar.bz2
gsoc2013-evolution-94ec01deda562c323ead315c4ea48043db68b8d0.tar.lz
gsoc2013-evolution-94ec01deda562c323ead315c4ea48043db68b8d0.tar.xz
gsoc2013-evolution-94ec01deda562c323ead315c4ea48043db68b8d0.tar.zst
gsoc2013-evolution-94ec01deda562c323ead315c4ea48043db68b8d0.zip
Remove a weak pointer when disposing EAttachmentHandler.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/e-attachment-handler.c18
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,