[Libreoffice-commits] .: sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Mar 2 13:21:37 PST 2011
sw/source/core/unocore/unorefmk.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 52a5db57f2f4b695e2ecf0b092bcf2152eb56d9c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 2 13:00:18 2011 +0000
Resolves: rhbz#672818 bandaid for crash in SwTxtNode::GetTxtAttrForCharAt
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 436a2bb..e461f71 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -261,8 +261,10 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
}
else
{
- pTxtAttr = rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
- rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK);
+ SwTxtNode *pTxtNd = rPam.GetNode()->GetTxtNode();
+ OSL_ASSERT(pTxtNd);
+ pTxtAttr = pTxtNd ? rPam.GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
+ rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK) : NULL;
}
if (!pTxtAttr)
More information about the Libreoffice-commits
mailing list