Fix wxMask copy ctor from an uninitialized mask in wxMSW
Don't assert when copying an invalid, i.e. uninitialized, mask in wxMSW. Do initialize m_maskBitmap in any case in the copy ctor. Closes #19171.
This commit is contained in:
committed by
Vadim Zeitlin
parent
37af51c513
commit
5dbdada6aa
@@ -1483,6 +1483,15 @@ wxMask::wxMask()
|
||||
wxMask::wxMask(const wxMask &mask)
|
||||
: wxObject()
|
||||
{
|
||||
m_maskBitmap = 0;
|
||||
|
||||
if ( !mask.m_maskBitmap )
|
||||
{
|
||||
// Copying uninitialized mask shouldn't do anything, and notably not
|
||||
// result in an assertion failure below.
|
||||
return;
|
||||
}
|
||||
|
||||
BITMAP bmp;
|
||||
|
||||
HDC srcDC = CreateCompatibleDC(0);
|
||||
|
Reference in New Issue
Block a user