Stop crash/asserts caused when Clear() deletes the wxRegionRefData.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier 2008-09-11 05:07:06 +00:00
parent 2f2635175a
commit c6f2bde160

View File

@ -274,6 +274,8 @@ wxRegionGeneric::wxRegionGeneric(const wxPoint& topLeft, const wxPoint& bottomRi
void wxRegionGeneric::Clear()
{
UnRef();
if (!m_refData)
m_refData = new wxRegionRefData(wxRect(0,0,0,0));
}
wxGDIRefData *wxRegionGeneric::CreateGDIRefData() const