X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..fd76aa8d8ae3d8b702b7155ce15c1a927257f1fc:/src/mac/palette.cpp diff --git a/src/mac/palette.cpp b/src/mac/palette.cpp index 676f54739a..c847131f40 100644 --- a/src/mac/palette.cpp +++ b/src/mac/palette.cpp @@ -13,9 +13,15 @@ #pragma implementation "palette.h" #endif +#include "wx/defs.h" + +#if wxUSE_PALETTE + #include "wx/palette.h" +#if !USE_SHARED_LIBRARIES IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject) +#endif /* * Palette @@ -30,7 +36,10 @@ wxPaletteRefData::wxPaletteRefData() wxPaletteRefData::~wxPaletteRefData() { - delete[] m_palette ; + if (m_palette != NULL) { + delete[] m_palette ; + m_palette = NULL; + } } wxPalette::wxPalette() @@ -104,4 +113,6 @@ bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsi return TRUE; } +#endif + // wxUSE_PALETTE