X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa349e95cc0dac7b982b2a131526b751456f3e26..170acdc90e9f92f8b8120fa6c04acdbf45c89582:/src/gtk/colordlg.cpp diff --git a/src/gtk/colordlg.cpp b/src/gtk/colordlg.cpp index 8571dab73e..b264c991ca 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); + g_object_set(settings, "gtk-color-palette", pal.c_str(), NULL); } void wxColourDialog::DialogToColourData()