[Libreoffice-commits] .: sw/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Wed Jun 20 04:23:58 PDT 2012
sw/source/core/doc/docfly.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 017a82c50c338a4304ca0b945ed04c7d2d62f1d5
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Wed Jun 20 13:24:17 2012 +0200
SwDoc::SetFlyFrmAnchor: fix crash when SwTxtNode has no hints
Change-Id: I5178ff1bbf1a3e8eebec10f44e74d9d0806d3168
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index e867da1..388f11d 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -261,7 +261,8 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, sal_Bool bNew
"Missing FlyInCnt-Hint." );
OSL_ENSURE( pHnt && pHnt->GetFlyCnt().GetFrmFmt() == &rFmt,
"Wrong TxtFlyCnt-Hint." );
- const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt()).SetFlyFmt();
+ if (pHnt)
+ const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt()).SetFlyFmt();
// They are disconnected. We now have to destroy the attribute.
pTxtNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx, nIdx );
More information about the Libreoffice-commits
mailing list