Fix crash in wxRegion in wxOSX/Carbon.
Apparently some code expects to be able to call wxRegion::GetWXHRGN() even on an invalid wxRegion. Return NULL in this case instead of crashing. This fixes crash on startup of the widgets sample. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0d2a693bbd
commit
00c784a4d1
@ -309,6 +309,9 @@ bool wxRegion::IsEmpty() const
|
||||
|
||||
WXHRGN wxRegion::GetWXHRGN() const
|
||||
{
|
||||
if ( !m_refData )
|
||||
return NULL;
|
||||
|
||||
return M_REGION ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user