]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/filedlg.cpp
Fix memory leak by letting the base class version handle the
[wxWidgets.git] / src / msw / filedlg.cpp
index 7888780761afc82e5f6c1c41d94e2fcf45c38c7b..7adedb7f72033164a5d1be4db57991c903b68e6a 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:     wxWindows licence
+// Licence:     wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -139,9 +139,14 @@ int wxFileDialog::ShowModal()
     *fileNameBuffer = wxT('\0');
     *titleBuffer    = wxT('\0');
 
+#if WXWIN_COMPATIBILITY_2_4
     long msw_flags = 0;
     if ( (m_dialogStyle & wxHIDE_READONLY) || (m_dialogStyle & wxSAVE) )
         msw_flags |= OFN_HIDEREADONLY;
+#else
+    long msw_flags = OFN_HIDEREADONLY;
+#endif
+
     if ( m_dialogStyle & wxFILE_MUST_EXIST )
         msw_flags |= OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;