X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/545cb3fcf2460919deb52cf47f6cb0bdf494fae7..b35549525f2a8dd584fdda158829e8406da0541e:/src/x11/bitmap.cpp diff --git a/src/x11/bitmap.cpp b/src/x11/bitmap.cpp index e528547e83..fac57599b1 100644 --- a/src/x11/bitmap.cpp +++ b/src/x11/bitmap.cpp @@ -295,7 +295,7 @@ bool wxBitmapRefData::Create(int width, int height, int depth) #else // !wxUSE_NANOX Window xroot = RootWindow(m_display, xscreen); - *(depth == 1 ? &m_bitmap : &m_pixmap) = + *(depth == 1 ? &m_bitmap : &m_pixmap) = XCreatePixmap(m_display, xroot, width, height, depth); #endif // wxUSE_NANOX/!wxUSE_NANOX @@ -1072,8 +1072,7 @@ void wxBitmap::SetPalette(const wxPalette& palette) wxT("cannot set palette for bitmap of this depth")); AllocExclusive(); - delete M_BMPDATA->m_palette; - M_BMPDATA->m_palette = NULL; + wxDELETE(M_BMPDATA->m_palette); if (!palette.Ok()) return;