guard against nullptr
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1639,6 +1639,8 @@ bool wxMask::Create(const wxBitmap& bitmap)
|
|||||||
unsigned char * destdatabase = (unsigned char*) m_memBuf.GetWriteBuf( size ) ;
|
unsigned char * destdatabase = (unsigned char*) m_memBuf.GetWriteBuf( size ) ;
|
||||||
wxASSERT( destdatabase != NULL ) ;
|
wxASSERT( destdatabase != NULL ) ;
|
||||||
|
|
||||||
|
if ( destdatabase )
|
||||||
|
{
|
||||||
memset( destdatabase , 0 , size ) ;
|
memset( destdatabase , 0 , size ) ;
|
||||||
unsigned char * srcdata = (unsigned char*) bitmap.GetRawAccess() ;
|
unsigned char * srcdata = (unsigned char*) bitmap.GetRawAccess() ;
|
||||||
|
|
||||||
@@ -1660,6 +1662,7 @@ bool wxMask::Create(const wxBitmap& bitmap)
|
|||||||
*destdata++ = 0x00 ;
|
*destdata++ = 0x00 ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_memBuf.UngetWriteBuf( size ) ;
|
m_memBuf.UngetWriteBuf( size ) ;
|
||||||
RealizeNative() ;
|
RealizeNative() ;
|
||||||
|
|||||||
Reference in New Issue
Block a user