[Libreoffice-commits] .: sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Aug 24 06:47:01 PDT 2011
sw/source/core/layout/paintfrm.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit b5040d946ee078ab16ad175dbf6bdc072f9e80ec
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Aug 24 14:45:41 2011 +0100
Resolves: fdo#40345 don't crash loading temp document to get frame styles
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 15cd791..61068a0 100755
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2955,7 +2955,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
const SwContact* pContact = ::GetUserCall( pDrawObj );
const SwAnchoredObject* pObj = pContact->GetAnchoredObj( pDrawObj );
- const SwFrm* pAnchorFrm = pObj->GetAnchorFrm();
+ const SwFrm* pAnchorFrm = pObj ? pObj->GetAnchorFrm() : NULL;
bool bInHeaderFooter = false;
// Handle all non anchored as character objects... others are handled elsewere
@@ -3557,7 +3557,8 @@ sal_Bool SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
{
// OD 13.10.2003 #i19919# - consider 'virtual' drawing objects
// OD 2004-03-29 #i26791#
- pAnch = ((SwDrawContact*)pUserCall)->GetAnchorFrm( pObj );
+ SwDrawContact* pDrawContact = dynamic_cast<SwDrawContact*>(pUserCall);
+ pAnch = pDrawContact ? pDrawContact->GetAnchorFrm(pObj) : NULL;
if ( pAnch )
{
if ( !pAnch->GetValidPosFlag() )
More information about the Libreoffice-commits
mailing list