Author: orcmid Date: Tue Jul 19 22:19:03 2016 New Revision: 1753426 URL: http://svn.apache.org/viewvc?rev=1753426&view=rev Log: Guard removal and replacement of unavailable slots per #i127045#
Modified: openoffice/trunk/main/tools/source/generic/poly2.cxx Modified: openoffice/trunk/main/tools/source/generic/poly2.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/tools/source/generic/poly2.cxx?rev=1753426&r1=1753425&r2=1753426&view=diff ============================================================================== --- openoffice/trunk/main/tools/source/generic/poly2.cxx (original) +++ openoffice/trunk/main/tools/source/generic/poly2.cxx Tue Jul 19 22:19:03 2016 @@ -198,6 +198,7 @@ void PolyPolygon::Remove( sal_uInt16 nPo { DBG_CHKTHIS( PolyPolygon, NULL ); DBG_ASSERT( nPos < Count(), "PolyPolygon::Remove(): nPos >= nSize" ); + if ( nPos >= Count() ) return; // not removable if ( mpImplPolyPolygon->mnRefCount > 1 ) { @@ -218,6 +219,7 @@ void PolyPolygon::Replace( const Polygon { DBG_CHKTHIS( PolyPolygon, NULL ); DBG_ASSERT( nPos < Count(), "PolyPolygon::Replace(): nPos >= nSize" ); + if ( nPos >= Count() ) return; // not replaceable if ( mpImplPolyPolygon->mnRefCount > 1 ) {