]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/palette.cpp
make sure we don't keep a focus pointer to a window that gets deleted
[wxWidgets.git] / src / mac / palette.cpp
index 1c18196135861acd9c20f81456b50ce4ef9b34dd..c847131f4021a64d2d4e3cd5f6d5520e0add2a1e 100644 (file)
@@ -36,7 +36,10 @@ wxPaletteRefData::wxPaletteRefData()
 
 wxPaletteRefData::~wxPaletteRefData()
 {
-       delete[] m_palette ;
+    if (m_palette != NULL) {
+        delete[] m_palette ;
+        m_palette = NULL;
+    }
 }
 
 wxPalette::wxPalette()