--- poly2.cxx (revision 1713334) +++ poly2.cxx (working copy) @@ -196,20 +196,21 @@ void PolyPolygon::Remove( sal_uInt16 nPos ) { - DBG_CHKTHIS( PolyPolygon, NULL ); - DBG_ASSERT( nPos < Count(), "PolyPolygon::Remove(): nPos >= nSize" ); + DBG_CHKTHIS( PolyPolygon, NULL ); + DBG_ASSERT( nPos < Count(), "PolyPolygon::Remove(): nPos >= nSize" ); + if ( nPos >= Count() ) return; // not removable // ----------------------------------------------------------------------- @@ -216,17 +217,18 @@ void PolyPolygon::Replace( const Polygon& rPoly, sal_uInt16 nPos ) { - DBG_CHKTHIS( PolyPolygon, NULL ); - DBG_ASSERT( nPos < Count(), "PolyPolygon::Replace(): nPos >= nSize" ); + DBG_CHKTHIS( PolyPolygon, NULL ); + DBG_ASSERT( nPos < Count(), "PolyPolygon::Replace(): nPos >= nSize" ); + if ( nPos >= Count() ) return; // not replaceable // eof