From 07421d20b5a68a40533f308f7e2151aa7aa069d5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 21 Sep 2003 00:06:05 +0000 Subject: [PATCH] memory leak fixes in file dialogs (patch 783812) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/generic/filedlgg.cpp | 2 +- src/gtk/filedlg.cpp | 2 +- src/gtk1/filedlg.cpp | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 1d04f5dcf1..ab3fbccd3e 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -215,6 +215,7 @@ wxGTK - fixed compilation with --disable-compat-22 - set the event object correctly for wxMenu events (Bob Balfour) +- fixed memory leak in wxFileDialog (Christian Sturmlechner) wxMSW: diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 6495e24b8a..0b51e46ce8 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -1445,7 +1445,7 @@ void wxFileDialog::HandleAction( const wxString &fn ) wxString cwd; wxSplitPath(filename, &cwd, NULL, NULL); - if ( cwd != wxGetWorkingDirectory() ) + if ( cwd != wxGetCwd() ) { wxSetWorkingDirectory(cwd); } diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index 946ae917c4..a574ad5c31 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -89,7 +89,7 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial wxString cwd; wxSplitPath(filename, &cwd, NULL, NULL); - if ( cwd != wxGetWorkingDirectory() ) + if ( cwd != wxGetCwd() ) { wxSetWorkingDirectory(cwd); } diff --git a/src/gtk1/filedlg.cpp b/src/gtk1/filedlg.cpp index 946ae917c4..a574ad5c31 100644 --- a/src/gtk1/filedlg.cpp +++ b/src/gtk1/filedlg.cpp @@ -89,7 +89,7 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial wxString cwd; wxSplitPath(filename, &cwd, NULL, NULL); - if ( cwd != wxGetWorkingDirectory() ) + if ( cwd != wxGetCwd() ) { wxSetWorkingDirectory(cwd); }