X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c66f293b6d7c7ef99cf8f8fc7b391d694e169f0..2ad99bc1398db5a619b3682e90ad7a99485ae4c9:/src/mac/dirmac.cpp?ds=sidebyside diff --git a/src/mac/dirmac.cpp b/src/mac/dirmac.cpp index c1b010f5f7..729be9473d 100644 --- a/src/mac/dirmac.cpp +++ b/src/mac/dirmac.cpp @@ -40,6 +40,8 @@ #include #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; + } } // ----------------------------------------------------------------------------