]> 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 c1b010f5f77966e0a30f3e41744d223d73567c11..729be9473d485e1699b8fb4c09169bc19040e297 100644 (file)
@@ -40,6 +40,8 @@
   #include <windows.h>
 #endif
 
+#include "wx/mac/private.h"
+
 #include "MoreFiles.h"
 #include "MoreFilesExtras.h"
 
@@ -251,7 +253,10 @@ wxString wxDir::GetName() const
 
 wxDir::~wxDir()
 {
-    delete M_DIR;
+    if (M_DIR != NULL) {
+        delete M_DIR;
+        m_data = NULL;
+    }
 }
 
 // ----------------------------------------------------------------------------