diff --git a/src/gtk/colordlg.cpp b/src/gtk/colordlg.cpp index 8571dab73e..4c14ef5dfc 100644 --- a/src/gtk/colordlg.cpp +++ b/src/gtk/colordlg.cpp @@ -104,12 +104,10 @@ void wxColourDialog::ColourDataToDialog() } } - gchar *pal = gtk_color_selection_palette_to_string(colors, n_colors); + wxGtkString pal(gtk_color_selection_palette_to_string(colors, n_colors)); GtkSettings *settings = gtk_widget_get_settings(GTK_WIDGET(sel)); g_object_set(settings, "gtk-color-palette", pal, NULL); - - g_free(pal); } void wxColourDialog::DialogToColourData()