[Libreoffice-commits] .: sw/source
Tor Lillqvist
tml at kemper.freedesktop.org
Thu Mar 8 06:02:05 PST 2012
sw/source/core/doc/doccomp.cxx | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
New commits:
commit 706cac767c90281b74fbc27a134b022d27e2ce21
Author: Szabolcs Dezsi <dezsiszabi at hotmail.com>
Date: Thu Mar 8 14:52:14 2012 +0100
fdo#43424: Comparing empty document with attached one crashes LO
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 )
More information about the Libreoffice-commits
mailing list