]> git.saurik.com Git - wxWidgets.git/commitdiff
Stop crash/asserts caused when Clear() deletes the wxRegionRefData.
authorKevin Ollivier <kevino@theolliviers.com>
Thu, 11 Sep 2008 05:07:06 +0000 (05:07 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Thu, 11 Sep 2008 05:07:06 +0000 (05:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/regiong.cpp

index 9511c83df2fb8c8dca41a8c52895676503dbc76e..d9ee1d95dea5c6d9a6a5e0c3678551eacfe634f6 100644 (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