From 4b4e4b3582ef1b0edc401099338f7923f5320eea Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 2 Jun 2011 11:39:43 +0100 Subject: Resolves: rhbz#710004 band-aid for immediate crash in IsAlignPossible --- sw/source/core/frmedt/feshview.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index f464b41a615a..436153808496 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2554,8 +2554,9 @@ sal_Bool SwFEShell::IsAlignPossible() const { SdrObject *pO = Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj(); SwDrawContact *pC = (SwDrawContact*)GetUserCall(pO); + OSL_ENSURE( pC, "No SwDrawContact!"); //only as character bound drawings can be aligned - bRet = (pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_AS_CHAR); + bRet = pC ? (pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_AS_CHAR) : sal_False; } if ( bRet ) return Imp()->GetDrawView()->IsAlignPossible(); -- cgit v1.2.3