summaryrefslogtreecommitdiff
path: root/filter/source/msfilter/escherex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/msfilter/escherex.cxx')
-rw-r--r--filter/source/msfilter/escherex.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 81a12ed86b00..5d5809b7f78c 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1962,8 +1962,12 @@ sal_Int32 GetValueForEnhancedCustomShapeParameter( const com::sun::star::drawing
{
case com::sun::star::drawing::EnhancedCustomShapeParameterType::EQUATION :
{
- nValue = (sal_uInt16)rEquationOrder[ nValue ];
- nValue |= (sal_uInt32)0x80000000;
+ OSL_ASSERT(nValue < rEquationOrder.size());
+ if ( nValue < rEquationOrder.size() )
+ {
+ nValue = (sal_uInt16)rEquationOrder[ nValue ];
+ nValue |= (sal_uInt32)0x80000000;
+ }
}
break;
case com::sun::star::drawing::EnhancedCustomShapeParameterType::NORMAL :