From 23e9cca320eebd3b2d9bc8aa260e67c42db86db7 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Thu, 16 Mar 2023 11:54:24 +0100 Subject: [PATCH] main-window: Use gtk_widget_destroy() for windows Top level widgets should typically call gtk_widget_destroy() --- src/calls-main-window.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calls-main-window.c b/src/calls-main-window.c index fcbdcd5..5cd18c5 100644 --- a/src/calls-main-window.c +++ b/src/calls-main-window.c @@ -413,7 +413,10 @@ dispose (GObject *object) CallsMainWindow *self = CALLS_MAIN_WINDOW (object); g_clear_object (&self->record_store); - g_clear_object (&self->account_overview); + if (self->account_overview) { + gtk_widget_destroy (GTK_WIDGET (self->account_overview)); + self->account_overview = NULL; + } G_OBJECT_CLASS (calls_main_window_parent_class)->dispose (object); }