From fcf23e8a44f410e79149b9e7a649d42cc245026b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 24 Jan 2014 15:22:55 +0000 Subject: coverity#706117 Allocation too small for type Change-Id: I1bb2bd26e533cf5b7de5225f0bcf323446e69f63 --- basic/source/basmgr/basmgr.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'basic') diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index a797947507ee..7a22f786c771 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -2074,8 +2074,8 @@ SbxObject* implCreateDialog( uno::Sequence< sal_Int8 > aData ) { sal_Int8* pData = aData.getArray(); SvMemoryStream aMemStream( pData, aData.getLength(), STREAM_READ ); - SbxObject* pDialog = (SbxObject*)SbxBase::Load( aMemStream ); - return pDialog; + SbxBase* pBase = SbxBase::Load( aMemStream ); + return dynamic_cast(pBase); } // HACK! Because this value is defined in basctl/inc/vcsbxdef.hxx -- cgit