1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-09-28 23:05:32 +00:00

application: Only destroy previously created widgets

If this is not the primary instance self->main_window and
self->call_window will not have been created in the first place.

Fixes: e878fabb27
This commit is contained in:
Evangelos Ribeiro Tzaras 2023-01-20 18:20:24 +01:00
parent 481c67a707
commit 0c004b5204

View file

@ -686,8 +686,10 @@ finalize (GObject *object)
g_clear_handle_id (&self->id_sigterm, g_source_remove);
g_clear_handle_id (&self->id_sigint, g_source_remove);
gtk_widget_destroy (GTK_WIDGET (self->main_window));
gtk_widget_destroy (GTK_WIDGET (self->call_window));
if (self->main_window)
gtk_widget_destroy (GTK_WIDGET (self->main_window));
if (self->call_window)
gtk_widget_destroy (GTK_WIDGET (self->call_window));
g_clear_object (&self->record_store);
g_clear_object (&self->ringer);