Commit 4bc8ef84 authored by Gaël Bonithon's avatar Gaël Bonithon Committed by Alexander Schwinn
Browse files

color-settings: Fix ColorSettings release

The dialog should not be destroyed, since it is owned by the GtkBuilder,
which is released at the end of `main()`. Also, when the dialog is
embedded in the setting manager, the wrong connection of
`color_settings_dialog_destroy()` causes segmentation fault, since the
pointers accessed are not the right ones.

Fixes #211
MR !65
parent e76575dd
Pipeline #14715 passed with stages
in 2 minutes and 56 seconds
......@@ -920,7 +920,6 @@ color_settings_profiles_list_box_row_activated_cb (GtkListBox *list_box,
static void
color_settings_dialog_destroy (ColorSettings *settings)
gtk_widget_destroy (GTK_WIDGET (settings->dialog_assign));
g_clear_object (&settings->cancellable);
g_clear_object (&settings->client);
g_clear_object (&settings->current_device);
......@@ -1438,7 +1437,8 @@ main (gint argc, gchar **argv)
else {
/* Create plug widget */
plug = gtk_plug_new (opt_socket_id);
g_signal_connect (plug, "delete-event", G_CALLBACK (color_settings_dialog_destroy), settings);
g_signal_connect_swapped (plug, "delete-event",
G_CALLBACK (color_settings_dialog_destroy), settings);
gtk_widget_show (plug);
/* Stop startup notification */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment