--- tools/source/generic/poly2.cxx.orig	2014-02-25 08:20:50 UTC
+++ tools/source/generic/poly2.cxx
@@ -196,8 +196,9 @@ void PolyPolygon::Insert( const Polygon&
 
 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
 
 	if ( mpImplPolyPolygon->mnRefCount > 1 )
 	{
@@ -216,8 +217,9 @@ void PolyPolygon::Remove( sal_uInt16 nPo
 
 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	
 
 	if ( mpImplPolyPolygon->mnRefCount > 1 )
 	{
