]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/bitmap.cpp
compilation fixes - wxGTK compiles but not links
[wxWidgets.git] / src / msw / bitmap.cpp
index 4c21494fcb4ba8ccde1635807669420f1d111aba..437a6c4452a4988e261a0075cde4e5adbc45c222 100644 (file)
@@ -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 )
     {