diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-02 11:39:43 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-02 11:39:43 +0100 |
commit | 4b4e4b3582ef1b0edc401099338f7923f5320eea (patch) | |
tree | 525ea8f945707749948d1b9603c64188322bdd8a | |
parent | 2e846d734bf3965c4104a5baab35a8fa524d42a2 (diff) |
Resolves: rhbz#710004 band-aid for immediate crash in IsAlignPossible
-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(); |