From: Vadim Zeitlin Date: Tue, 21 Oct 2003 12:51:50 +0000 (+0000) Subject: free the DIB for raw bitmaps even if they don't use alpha channel X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/289307fa14491a0db9c6bfe6b8940067b27b2c8e free the DIB for raw bitmaps even if they don't use alpha channel git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 995596b224..3a3798dce3 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -1510,20 +1510,20 @@ void wxBitmap::UngetRawData(wxPixelDataBase& dataBase) p = rowStart; p.OffsetY(data, 1); } + } - // if we're a DDB we need to convert DIB back to DDB now to make the - // changes made via raw bitmap access effective - if ( !GetBitmapData()->m_isDIB ) - { - wxDIB *dib = GetBitmapData()->m_dib; - GetBitmapData()->m_dib = NULL; + // if we're a DDB we need to convert DIB back to DDB now to make the + // changes made via raw bitmap access effective + if ( !GetBitmapData()->m_isDIB ) + { + wxDIB *dib = GetBitmapData()->m_dib; + GetBitmapData()->m_dib = NULL; - // TODO: convert + // TODO: convert - delete dib; - } + delete dib; } -#endif +#endif // wxUSE_WXDIB } #endif // #ifdef wxHAVE_RAW_BITMAP