From e6e7e5deb320962e31a4d8c49028002c3aa061df Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 3 Oct 2014 10:31:30 +0100 Subject: coverity#1242477 Dereference null return value Change-Id: Ic2d8dab00d5af47f6274433ee811f567f990400b --- sc/source/ui/view/tabvwshg.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sc/source/ui/view/tabvwshg.cxx') diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx index 1f61bdfb509c..0387b746495e 100644 --- a/sc/source/ui/view/tabvwshg.cxx +++ b/sc/source/ui/view/tabvwshg.cxx @@ -61,6 +61,9 @@ void ScTabViewShell::InsertURLButton( const OUString& rName, const OUString& rUR SdrObject* pObj = SdrObjFactory::MakeNewObject(FmFormInventor, OBJ_FM_BUTTON, pDrView->GetSdrPageView()->GetPage(), pModel); SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, pObj); + OSL_ENSURE( pUnoCtrl, "no SdrUnoObj"); + if( !pUnoCtrl ) + return; uno::Reference xControlModel = pUnoCtrl->GetUnoControlModel(); OSL_ENSURE( xControlModel.is(), "UNO-Control ohne Model" ); -- cgit