diff options
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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(); |