]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/mimecmn.cpp
fix for clicking on the button from 2.2 branch
[wxWidgets.git] / src / common / mimecmn.cpp
index 278d3bc4afce2f17b63a18c3285f6da854569a4c..7ee3ef0dff6ceffe99262112ad89e0b8bb5deb81 100644 (file)
@@ -55,9 +55,9 @@
 // implementation classes:
 #if defined(__WXMSW__)
     #include "wx/msw/mimetype.h"
-#elif defined (__WXMAC__)
+#elif defined(__WXMAC__)
     #include "wx/mac/mimetype.h"
-#elif defined (__WXPM__)
+#elif defined(__WXPM__)
     #include "wx/os2/mimetype.h"
 #else // Unix
     #include "wx/unix/mimetype.h"
@@ -207,7 +207,8 @@ wxFileType::wxFileType()
 
 wxFileType::~wxFileType()
 {
-    delete m_impl;
+    if ( m_impl )
+        delete m_impl;
 }
 
 bool wxFileType::GetExtensions(wxArrayString& extensions)
@@ -413,7 +414,8 @@ wxMimeTypesManager::wxMimeTypesManager()
 
 wxMimeTypesManager::~wxMimeTypesManager()
 {
-    delete m_impl;
+    if ( m_impl )
+        delete m_impl;
 }
 
 wxFileType *