event-editor/multi-choice: Check if destructor exists before clearing

Without this check, the app supposedly crashes when we close it.

GtkListBox frees itself the same way.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/723>
This commit is contained in:
Hari Rana
2026-03-12 01:12:29 +00:00
committed by Marge Bot
parent 255a1ece56
commit 39cee3cbc3
+2 -1
View File
@@ -372,7 +372,8 @@ gcal_multi_choice_dispose (GObject *object)
g_clear_pointer (&self->prev_button_tooltip_text, g_free);
g_clear_pointer (&self->next_button_tooltip_text, g_free);
g_clear_pointer (&self->format_data, self->format_destroy);
if (self->format_destroy)
g_clear_pointer (&self->format_data, self->format_destroy);
if (self->popover)
{