From 8ffc8f1fb9f923f6abb61e38557d0acb58572b99 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 14 Apr 2003 01:03:04 +0000 Subject: [PATCH] added debug checks git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/dc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index c153967b61..e44692390d 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -2303,7 +2303,7 @@ static void wxAlphaBlend(wxDC& dc, int xDst, int yDst, int w, int h, const wxBitmap& bmpSrc) { // get the destination DC pixels - wxBitmap bmpDst(w, h, 32); + wxBitmap bmpDst(w, h, 32 /* force creating RGBA DIB */); MemoryHDC hdcMem; SelectInHDC select(hdcMem, GetHbitmapOf(bmpDst)); @@ -2316,6 +2316,9 @@ wxAlphaBlend(wxDC& dc, int xDst, int yDst, int w, int h, const wxBitmap& bmpSrc) wxRawBitmapData dataDst(bmpDst), dataSrc(bmpSrc); + wxCHECK_RET( dataDst && dataSrc, + _T("failed to get raw data in wxAlphaBlend") ); + wxRawBitmapIterator pDst(dataDst), pSrc(dataSrc); -- 2.45.2