cid#705480 Dereference null return value

Change-Id: I0ad30d7a2447edbe9d42f0e69470ca850498b798
Reviewed-on: https://gerrit.libreoffice.org/75722
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2019-07-16 12:53:08 +01:00
parent 50e2704c80
commit 08b4e94758

View File

@@ -1078,7 +1078,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons
const OUString sViewBox( "ViewBox" );
const Any* pViewBox = const_cast<SdrCustomShapeGeometryItem&>(aGeometryItem).GetPropertyValueByName( sViewBox );
css::awt::Rectangle aViewBox;
if ( pViewBox && ( *pViewBox >>= aViewBox ) )
if (pViewBox && (*pViewBox >>= aViewBox) && pDefCustomShape)
{
if ( ( aViewBox.Width == pDefCustomShape->nCoordWidth )
&& ( aViewBox.Height == pDefCustomShape->nCoordHeight ) )