You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libreoffice/0001-Resolves-rhbz-710004-b...

30 lines
1.2 KiB

From 3860483d8cb9e259ca3f68347ba0e35f7bfb1739 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 2 Jun 2011 11:39:43 +0100
Subject: [PATCH] Resolves: rhbz#710004 band-aid for immediate crash in
IsAlignPossible (cherry picked from commit
d6839fa9aaac82892b5af2bc00c9ad196c9ff4bb)
---
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 ef9becd..87bc266 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();
--
1.7.5.2