diff --git a/src/generic/regiong.cpp b/src/generic/regiong.cpp index 9511c83df2..d9ee1d95de 100644 --- a/src/generic/regiong.cpp +++ b/src/generic/regiong.cpp @@ -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