]> git.saurik.com Git - wxWidgets.git/commitdiff
wxDC::Blit() ignores useMask if there is no mask instead of giving an assert failure
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 26 Jan 2000 14:08:11 +0000 (14:08 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 26 Jan 2000 14:08:11 +0000 (14:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dc.cpp

index f8c01f727dfc8cd9eb051c5b8dd750c2c5e7a9da..0744dc251e735c28e8bee21c7602a8676f194f42 100644 (file)
@@ -1255,8 +1255,12 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
         const wxBitmap& bmp = source->m_selectedBitmap;
         mask = bmp.GetMask();
 
         const wxBitmap& bmp = source->m_selectedBitmap;
         mask = bmp.GetMask();
 
-        wxCHECK_MSG( bmp.Ok() && mask && mask->GetMaskBitmap(), FALSE,
-                     _T("can't blit with mask without mask") );
+        if ( !(bmp.Ok() && mask && mask->GetMaskBitmap()) )
+        {
+            // don't give assert here because this would break existing
+            // programs - just silently ignore useMask parameter
+            useMask = FALSE;
+        }
     }
 
     COLORREF old_textground = ::GetTextColor(GetHdc());
     }
 
     COLORREF old_textground = ::GetTextColor(GetHdc());