From ab54489c3a9c24a9f85572a1e442988124f038a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 1 Oct 2014 16:24:17 +0100 Subject: [PATCH] coverity#704894 Explicit NULL derefenced Change-Id: If1e812f9b3c93c8e81817dc599d1d732dbc68b0c --- sw/source/core/layout/atrfrm.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 1b11a2874195..5932f59d5a16 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2836,7 +2836,7 @@ void SwFlyFrmFmt::MakeFrms() if( bAdd ) { - SwFlyFrm *pFly = 0; + SwFlyFrm *pFly; switch( aAnchorAttr.GetAnchorId() ) { case FLY_AT_FLY: @@ -2848,12 +2848,12 @@ void SwFlyFrmFmt::MakeFrms() pFly = new SwFlyAtCntFrm( this, pFrm, pFrm ); break; + default: + assert(false && "Neuer Ankertyp" ); + //fall-through case FLY_AS_CHAR: pFly = new SwFlyInCntFrm( this, pFrm, pFrm ); break; - default: - OSL_ENSURE( false, "Neuer Ankertyp" ); - break; } pFrm->AppendFly( pFly ); SwPageFrm *pPage = pFly->FindPageFrm();