From 439b46af89ff9145104453fe8e417059fed27863 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Wed, 13 Sep 2023 17:51:34 -0300 Subject: [PATCH] core/calendar-monitor: Remove g_autoptr from a variable g_hash_table_lookup() is not transfer-full, so this g_autoptr + the g_hash_table_remove() call end up double-unreffing the event, which causes a crash. Remove g_autoptr from the variable. --- src/core/gcal-calendar-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/gcal-calendar-monitor.c b/src/core/gcal-calendar-monitor.c index e237c2ea..efe70290 100644 --- a/src/core/gcal-calendar-monitor.c +++ b/src/core/gcal-calendar-monitor.c @@ -1172,8 +1172,8 @@ remove_events_from_timeline_in_idle_cb (gpointer user_data) for (guint i = 0; i < event_ids->len; i++) { - g_autoptr (GcalEvent) event = NULL; const gchar *event_id; + GcalEvent *event; event_id = g_ptr_array_index (event_ids, i); event = g_hash_table_lookup (self->shared.events, event_id);