From: Vadim Zeitlin Date: Fri, 15 Jul 2011 22:58:30 +0000 (+0000) Subject: No real changes, just use AllocExclusive() in wxOSX wxRegion. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/22aa243d58c08be2b900fd46c8871e929f50d3f4?ds=inline No real changes, just use AllocExclusive() in wxOSX wxRegion. 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 --- diff --git a/src/osx/carbon/region.cpp b/src/osx/carbon/region.cpp index 7362c13aac..8f3eeb884f 100644 --- a/src/osx/carbon/region.cpp +++ b/src/osx/carbon/region.cpp @@ -202,17 +202,7 @@ bool wxRegion::DoCombine(const wxRegion& region, wxRegionOp op) { 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); - } + AllocExclusive(); switch (op) {