calendar-navigation-button: Fix active-date reference

Increase active-date reference count so the button and the window have
their own reference.

This fix the reference issue while the window is finalizing.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/638>
This commit is contained in:
Trystan Mata
2025-09-04 15:29:01 +00:00
committed by Marge Bot
parent 66542a6673
commit 38e355c3b1
+2 -1
View File
@@ -96,7 +96,8 @@ gcal_calendar_navigation_button_set_property (GObject *object,
switch (prop_id)
{
case PROP_ACTIVE_DATE:
self->active_date = g_value_get_boxed (value);
gcal_clear_date_time (&self->active_date);
self->active_date = g_date_time_ref (g_value_get_boxed (value));
/*
* Translators: %B is the month name and %Y is the year.
* More formats can be found on the doc: