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>