X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fedad417ce939cbb0ddb519e9777145c76712cb8..371fd015a7c7bd9aeaaccb05b19d07b69740755c:/src/mac/palette.cpp diff --git a/src/mac/palette.cpp b/src/mac/palette.cpp index 1c18196135..c847131f40 100644 --- a/src/mac/palette.cpp +++ b/src/mac/palette.cpp @@ -36,7 +36,10 @@ wxPaletteRefData::wxPaletteRefData() wxPaletteRefData::~wxPaletteRefData() { - delete[] m_palette ; + if (m_palette != NULL) { + delete[] m_palette ; + m_palette = NULL; + } } wxPalette::wxPalette()