Hi!
There was a call for GetLine( nInsPos-1 ); with nInsPos == 0 so it wanted to return aLines[ nLine
]; where nLine == -1.
(vector< CompareLine* > aLines;)
Files: sw/source/core/doc/doccomp.cxx (in SwCompareData::ShowDelete)
Szabolcs
From 0d726dc30eb85745eab8b83c710b57df99ee17e0 Mon Sep 17 00:00:00 2001
From: Szabolcs Dezsi <dezsiszabi@hotmail.com>
Date: Thu, 8 Mar 2012 14:52:14 +0100
Subject: [PATCH] Comparing empty document with attached one crashes LO
---
sw/source/core/doc/doccomp.cxx | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 80c77c4..11c43f3 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1536,14 +1536,17 @@ void SwCompareData::ShowDelete( const CompareData& rData, sal_uLong nStt,
((SwCompareLine*)rData.GetLine( nEnd-1 ))->GetEndNode(), 1 );
sal_uInt16 nOffset = 0;
- const CompareLine* pLine;
- if( GetLineCount() == nInsPos )
+ const CompareLine* pLine = 0;
+ if( nInsPos >= 1 )
{
- pLine = GetLine( nInsPos-1 );
- nOffset = 1;
+ if( GetLineCount() == nInsPos )
+ {
+ pLine = GetLine( nInsPos-1 );
+ nOffset = 1;
+ }
+ else
+ pLine = GetLine( nInsPos );
}
- else
- pLine = GetLine( nInsPos );
const SwNode* pLineNd;
if( pLine )
--
1.7.7
Context
- [PATCH] fdo#43424: LO Crashes while Comparing an Empty Document with Another Document · Dézsi Szabolcs
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.