X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f884a0dccd6b642f35c441ac9bfc87a6d5b4d35..85b6f1c431640d51535955da7d57383684fc0e27:/src/generic/regiong.cpp 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