application: Don't try to remove inexistent window

If the app never showed a window (e.g. in daemon mode) this
would otherwise raise a critical.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/760>
This commit is contained in:
Guido Günther
2024-10-03 14:25:02 +02:00
committed by Evangelos Ribeiro Tzaras
parent b640733424
commit 24542d3bc2

View File

@@ -98,7 +98,10 @@ quit_calls (CallsApplication *self)
if (self->shutdown)
return;
if (self->main_window)
gtk_application_remove_window (GTK_APPLICATION (self), GTK_WINDOW (self->main_window));
if (self->call_window)
gtk_application_remove_window (GTK_APPLICATION (self), GTK_WINDOW (self->call_window));
self->shutdown = TRUE;