[Libreoffice-commits] .: sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Oct 20 05:18:28 PDT 2010


 sw/source/core/bastyp/index.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit aa289b0ad1f12cbb0038d4ebc8b56d8079388ba6
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Tue Oct 19 18:13:06 2010 +0200

    Fixed a crash when importing some RTF file.
    
    This is pretty hacky... any better fix is welcomed.

diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx
index 144a95b..abb2a07 100644
--- a/sw/source/core/bastyp/index.cxx
+++ b/sw/source/core/bastyp/index.cxx
@@ -47,8 +47,8 @@ TYPEINIT0(SwIndexReg);	// rtti
 
 #ifdef CHK
 
-#define IDX_CHK_ARRAY       pArray->ChhkArr();
-#define ARR_CHK_ARRAY       ChhkArr();
+#define IDX_CHK_ARRAY       pArray->ChkArr();
+#define ARR_CHK_ARRAY       ChkArr();
 
 
 void SwIndexReg::ChkArr()
@@ -94,7 +94,7 @@ SwIndex::SwIndex(SwIndexReg *const pArr, xub_StrLen const nIdx)
         nIndex = 0;		// steht immer auf 0 !!!
     }
 
-    if( !pArray->pFirst )         // 1. Index ??
+    if( !pArray->pFirst || !pArray->pLast )         // 1. Index ??
         pArray->pFirst = pArray->pLast = this;
     else if( nIdx > ((pArray->pLast->nIndex - pArray->pFirst->nIndex) / 2) )
         ChgValue( *pArray->pLast, nIdx );


More information about the Libreoffice-commits mailing list