[gnome-calendar] calendar: Fix double unref



commit 64fa11f4c0d669be5feb3b1f72393cfdef4924c7
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat May 4 10:11:01 2019 -0300

    calendar: Fix double unref

 src/core/gcal-calendar.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/core/gcal-calendar.c b/src/core/gcal-calendar.c
index e11860b0..b2937425 100644
--- a/src/core/gcal-calendar.c
+++ b/src/core/gcal-calendar.c
@@ -181,14 +181,14 @@ gcal_calendar_initable_init (GInitable     *initable,
       GCAL_RETURN (FALSE);
     }
 
-  g_assert (E_IS_CAL_CLIENT (client));
-  self->client = E_CAL_CLIENT (client);
-
   self->readonly_changed_handler_id = g_signal_connect (client,
                                                         "notify::readonly",
                                                         G_CALLBACK (on_client_readonly_changed_cb),
                                                         self);
 
+  g_assert (E_IS_CAL_CLIENT (client));
+  self->client = (ECalClient*) g_steal_pointer (&client);
+
   GCAL_RETURN (TRUE);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]