X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1481968400c94128642815b6871724f118141cbc..89fad939ec0d423961d8e93b2a0927f5b77bf256:/src/gtk/fontdlg.cpp diff --git a/src/gtk/fontdlg.cpp b/src/gtk/fontdlg.cpp index 8c6f452f53..f6059b9e63 100644 --- a/src/gtk/fontdlg.cpp +++ b/src/gtk/fontdlg.cpp @@ -60,11 +60,9 @@ void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dial GtkFontSelectionDialog *fontdlg = GTK_FONT_SELECTION_DIALOG(dialog->m_widget); - gchar *fontname = gtk_font_selection_dialog_get_font_name(fontdlg); + wxGtkString fontname(gtk_font_selection_dialog_get_font_name(fontdlg)); dialog->SetChosenFont( fontname); - g_free( fontname ); - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK); event.SetEventObject( dialog ); dialog->GetEventHandler()->ProcessEvent( event );