From: Vadim Zeitlin Date: Wed, 1 Nov 2006 01:55:44 +0000 (+0000) Subject: initialize m_surface when copying invalid bitmap X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2ee16da2c31a6699ccdbe9ac2d80d16eb42dde5e initialize m_surface when copying invalid bitmap git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/dfb/bitmap.cpp b/src/dfb/bitmap.cpp index 8b57fb96de..72f4fda4c0 100644 --- a/src/dfb/bitmap.cpp +++ b/src/dfb/bitmap.cpp @@ -69,8 +69,7 @@ public: wxBitmapRefData(const wxBitmapRefData& data) { - if ( data.m_surface ) - m_surface = data.m_surface->Clone(); + m_surface = data.m_surface ? data.m_surface->Clone() : NULL; m_mask = data.m_mask ? new wxMask(*data.m_mask) : NULL; #if wxUSE_PALETTE @@ -78,7 +77,7 @@ public: #endif } - ~wxBitmapRefData() + virtual ~wxBitmapRefData() { delete m_mask; #if wxUSE_PALETTE