X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/519cb848a8f4c91c73421bb75314754284e593a4..29b30405aaef61ac091dc26df946ad90d0bc4f1b:/src/mac/palette.cpp?ds=sidebyside diff --git a/src/mac/palette.cpp b/src/mac/palette.cpp index 85a9fd16d8..c847131f40 100644 --- a/src/mac/palette.cpp +++ b/src/mac/palette.cpp @@ -13,6 +13,10 @@ #pragma implementation "palette.h" #endif +#include "wx/defs.h" + +#if wxUSE_PALETTE + #include "wx/palette.h" #if !USE_SHARED_LIBRARIES @@ -32,7 +36,10 @@ wxPaletteRefData::wxPaletteRefData() wxPaletteRefData::~wxPaletteRefData() { - delete[] m_palette ; + if (m_palette != NULL) { + delete[] m_palette ; + m_palette = NULL; + } } wxPalette::wxPalette() @@ -106,4 +113,6 @@ bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsi return TRUE; } +#endif + // wxUSE_PALETTE