]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/dirmac.cpp
Applied patch [ 583922 ] Make generic/wxListCtrl avail. in WIN32
[wxWidgets.git] / src / mac / dirmac.cpp
index 5aed922f84dbdff17f665c032c7042991b011974..729be9473d485e1699b8fb4c09169bc19040e297 100644 (file)
@@ -40,6 +40,8 @@
   #include <windows.h>
 #endif
 
+#include "wx/mac/private.h"
+
 #include "MoreFiles.h"
 #include "MoreFilesExtras.h"
 
@@ -165,7 +167,7 @@ bool wxDirData::Read(wxString *filename)
                        continue ;
 
                wxString file( m_name ) ;
-               if ( m_filespec.IsEmpty() || m_filespec == "*.*" )
+               if ( m_filespec.IsEmpty() || m_filespec == "*.*" || m_filespec == "*" )
                {
                }
                else if ( m_filespec.Length() > 1 && m_filespec.Left(1) =="*" )
@@ -251,7 +253,10 @@ wxString wxDir::GetName() const
 
 wxDir::~wxDir()
 {
-    delete M_DIR;
+    if (M_DIR != NULL) {
+        delete M_DIR;
+        m_data = NULL;
+    }
 }
 
 // ----------------------------------------------------------------------------