Resolves: rhbz#672818 crash in writer

f41
Caolán McNamara 14 years ago
parent 4113b15ca4
commit 95b644fbce

@ -0,0 +1,29 @@
From f0ec7af75b7c3566a0e8e71735b5cc237eb505d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 2 Mar 2011 13:00:18 +0000
Subject: [PATCH] Resolves: rhbz#672818 bandaid for crash in SwTxtNode::GetTxtAttrForCharAt
---
sw/source/core/unocore/unorefmk.cxx | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
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)
--
1.7.4.1

@ -116,6 +116,7 @@ Patch28: 0001-Resolves-rhbz-674330-dereference-of-NULL-mpBase.patch
Patch29: 0001-rhbz-678284-Get-correct-current-position-when-shift-page-up-and-.patch Patch29: 0001-rhbz-678284-Get-correct-current-position-when-shift-page-up-and-.patch
Patch30: 0001-Resolves-rhbz-681159-bandaid-for-crash.patch Patch30: 0001-Resolves-rhbz-681159-bandaid-for-crash.patch
Patch31: 0001-Resolves-fdo-33701-ensure-node-outlives-path.patch Patch31: 0001-Resolves-fdo-33701-ensure-node-outlives-path.patch
Patch32: 0001-Resolves-rhbz-672818-bandaid-for-crash-in-SwTxtNode-.patch
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir} %define instdir %{_libdir}
@ -750,6 +751,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch29 -p1 -b .rhbz678284-Get-correct-current-position-when-shift-page-up-and-.patch %patch29 -p1 -b .rhbz678284-Get-correct-current-position-when-shift-page-up-and-.patch
%patch30 -p1 -b .rhbz681159-bandaid-for-crash.patch %patch30 -p1 -b .rhbz681159-bandaid-for-crash.patch
%patch31 -p1 -b .fdo33701-ensure-node-outlives-path.patch %patch31 -p1 -b .fdo33701-ensure-node-outlives-path.patch
%patch32 -p1 -b .rhbz672818-bandaid-for-crash-in-SwTxtNode-.patch
touch scripting/source/pyprov/delzip touch scripting/source/pyprov/delzip
touch scripting/util/provider/beanshell/delzip touch scripting/util/provider/beanshell/delzip
touch scripting/util/provider/javascript/delzip touch scripting/util/provider/javascript/delzip
@ -2097,6 +2099,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%changelog %changelog
* Wed Mar 01 2011 Caolán McNamara <caolanm@redhat.com> 3.3.1.2-3 * Wed Mar 01 2011 Caolán McNamara <caolanm@redhat.com> 3.3.1.2-3
- Resolves: rhbz#681159 crash in writer - Resolves: rhbz#681159 crash in writer
- Resolves: rhbz#672818 crash in writer
- Resolves: fdo#33701 ensure node outlives path - Resolves: fdo#33701 ensure node outlives path
* Thu Feb 17 2011 Caolán McNamara <caolanm@redhat.com> 3.3.1.2-2 * Thu Feb 17 2011 Caolán McNamara <caolanm@redhat.com> 3.3.1.2-2

Loading…
Cancel
Save