diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-06-20 13:24:17 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-06-20 13:25:11 +0200 |
commit | 017a82c50c338a4304ca0b945ed04c7d2d62f1d5 (patch) | |
tree | 5b5fea7ad173ff7c7acfe80642207c1c1d260b65 | |
parent | 29d53d239066f967155e61aebc9cc3984756eb16 (diff) |
SwDoc::SetFlyFrmAnchor: fix crash when SwTxtNode has no hints
Change-Id: I5178ff1bbf1a3e8eebec10f44e74d9d0806d3168
-rw-r--r-- | sw/source/core/doc/docfly.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index e867da142462..388f11d0f89e 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 ); |