Kaydet (Commit) 76ca32af authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

Fixed a crash when importing some RTF file.

This is pretty hacky... any better fix is welcomed.
üst dd98f955
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment