X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f204026b42dd36af2716434232dd1937fab2465e..606b005fb2b535b34d1ca45d2d06ee86718e8b1c:/src/msw/bitmap.cpp diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 4c21494fcb..437a6c4452 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -1039,6 +1039,10 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) bool ok = TRUE; + // SelectObject() will fail + wxASSERT_MSG( !bitmap.GetSelectedInto(), + _T("bitmap can't be selected in another DC") ); + HGDIOBJ hbmpSrcOld = ::SelectObject(srcDC, GetHbitmapOf(bitmap)); if ( !hbmpSrcOld ) {