summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-02 10:39:43 (GMT)
committerCaolán McNamara <caolanm@redhat.com>2011-06-02 10:39:43 (GMT)
commit4b4e4b3582ef1b0edc401099338f7923f5320eea (patch)
tree525ea8f945707749948d1b9603c64188322bdd8a
parent2e846d734bf3965c4104a5baab35a8fa524d42a2 (diff)
Resolves: rhbz#710004 band-aid for immediate crash in IsAlignPossible
-rw-r--r--sw/source/core/frmedt/feshview.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index f464b41..4361538 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();