Don't fiddle with the reference count manually, just use the base class
function doing it instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68278
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxCHECK_MSG( region.IsOk(), false, wxT("invalid wxRegion") );
{
wxCHECK_MSG( region.IsOk(), false, wxT("invalid wxRegion") );
- // Don't change shared data
- if (!m_refData)
- {
- m_refData = new wxRegionRefData();
- }
- else if (m_refData->GetRefCount() > 1)
- {
- wxRegionRefData* ref = (wxRegionRefData*)m_refData;
- UnRef();
- m_refData = new wxRegionRefData(*ref);
- }