summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-29 20:38:18 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-10-01 07:52:07 +0000
commit3c8eb2fe90622afce3ee935000f8f549b5d0efa7 (patch)
treebdba5b4842ca2cac3967bd9a1c291332e44ec3d8 /svx
parentbccb5eff14b2aebd18fd933c2790d78a2fa940e9 (diff)
Resolves: fdo#79131 crash in EnhancedCustomShapeTypeNames::Get
Change-Id: Ib21a4a1574119120f09d4ecac73b93a0f2f6739f (cherry picked from commit 65277f994ae25d930c15aebba0ed19f8de0abba1) Reviewed-on: https://gerrit.libreoffice.org/11703 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
index 8e7966291913..6eca6e9b6e15 100644
--- a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
@@ -300,7 +300,7 @@ MSO_SPT EnhancedCustomShapeTypeNames::Get( const OUString& rShapeType )
OUString EnhancedCustomShapeTypeNames::Get( const MSO_SPT eShapeType )
{
- return eShapeType <= mso_sptTextBox
+ return (eShapeType <= mso_sptTextBox && eShapeType >= mso_sptMin)
? OUString::createFromAscii( pNameTypeTableArray[ eShapeType ].pS )
: OUString();
}