Commit patch [ 1559950 ] fix mem leaks in wx{Dir|File}Dialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -212,7 +212,13 @@ void wxDirDialog::SetPath(const wxString& dir)
|
||||
wxString wxDirDialog::GetPath() const
|
||||
{
|
||||
if (!gtk_check_version(2,4,0))
|
||||
return wxConvFileName->cMB2WX( gtk_file_chooser_get_filename( GTK_FILE_CHOOSER(m_widget) ) );
|
||||
{
|
||||
gchar *str = gtk_file_chooser_get_filename( GTK_FILE_CHOOSER(m_widget) );
|
||||
wxString ret = wxConvFileName->cMB2WX(str);
|
||||
if (str) g_free(str);
|
||||
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
return wxGenericDirDialog::GetPath();
|
||||
}
|
||||
|
Reference in New Issue
Block a user