gui/date-chooser: Properly remove idle source

When disposing of the widget, also remove the associated idle source
that might exist. This prevents a crash.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742>
This commit is contained in:
Georges Basile Stavracas Neto
2026-05-03 16:57:54 +00:00
committed by Marge Bot
parent c084e28400
commit cd82c2c52c
+3 -1
View File
@@ -66,7 +66,7 @@ struct _GcalDateChooser
gboolean show_events;
gboolean split_month_year;
gulong update_indicators_idle_id;
unsigned int update_indicators_idle_id;
};
static void gcal_view_interface_init (GcalViewInterface *iface);
@@ -873,6 +873,8 @@ gcal_date_chooser_finalize (GObject *object)
{
GcalDateChooser *self = GCAL_DATE_CHOOSER (object);
g_clear_handle_id (&self->update_indicators_idle_id, g_source_remove);
g_clear_object (&self->model_signal_group);
g_clear_pointer (&self->date, g_date_time_unref);