event: fix various reference ownership issues

This commit is contained in:
Georges Basile Stavracas Neto
2017-09-08 22:25:18 -03:00
parent 242db0436a
commit 5a0a3fcd9c
4 changed files with 16 additions and 21 deletions
+2 -2
View File
@@ -1842,7 +1842,7 @@ gcal_year_view_component_added (ECalDataModelSubscriber *subscriber,
/* Add the event to the cache */
for (i = start_month; i <= end_month; i++)
g_ptr_array_add (self->events[i], event);
g_ptr_array_add (self->events[i], g_object_ref (event));
update_sidebar (self);
@@ -2015,7 +2015,7 @@ gcal_year_view_init (GcalYearView *self)
guint i;
for (i = 0; i < 12; i++)
self->events[i] = g_ptr_array_new ();
self->events[i] = g_ptr_array_new_with_free_func (g_object_unref);
gtk_widget_init_template (GTK_WIDGET (self));