fix for assert when copying bitmap in CloneRefData()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-07-29 09:39:52 +00:00
parent 5a6371b940
commit 7b24e97518

View File

@ -264,7 +264,6 @@ wxObjectRefData *wxBitmap::CloneRefData(const wxObjectRefData *dataOrig) const
return NULL;
wxBitmap *self = wx_const_cast(wxBitmap *, this);
self->m_refData = new wxBitmapRefData(*data);
#if wxUSE_WXDIB
// copy the other bitmap
@ -273,7 +272,12 @@ wxObjectRefData *wxBitmap::CloneRefData(const wxObjectRefData *dataOrig) const
wxDIB dib((HBITMAP)(data->m_hBitmap));
self->CopyFromDIB(dib);
}
else
#endif // wxUSE_WXDIB
{
// don't copy the bitmap data, but do copy the size, depth, ...
self->m_refData = new wxBitmapRefData(*data);
}
return m_refData;
}