summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-02 11:39:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-02 11:48:26 +0100
commit3860483d8cb9e259ca3f68347ba0e35f7bfb1739 (patch)
treef647ac1405d001b862e490416b536db6dc652bf5
parentd1a735e8a8d52f7a4f9f2d63f403215bdc5f0561 (diff)
Resolves: rhbz#710004 band-aid for immediate crash in IsAlignPossible
(cherry picked from commit d6839fa9aaac82892b5af2bc00c9ad196c9ff4bb)
-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 ef9becd0a7..87bc266c03 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2566,8 +2566,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();