From: Dom Lachowicz (doml@appligent.com)
Date: Fri Aug 02 2002 - 01:09:56 EDT
World.abw crashed Abi due to Tomas' new breakNeighborsAtDirBoundaries().
I added 2 checks for null spans and the problem went away. If this
attached patch is incorrect, please revert the commit and fix it
properly.
Thanks,
Dom
Index: src/text/fmt/xp/fp_TextRun.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fp_TextRun.cpp,v
retrieving revision 1.175
diff -u -r1.175 fp_TextRun.cpp
--- src/text/fmt/xp/fp_TextRun.cpp 1 Aug 2002 21:48:05 -0000
1.175
+++ src/text/fmt/xp/fp_TextRun.cpp 2 Aug 2002 05:16:32 -0000
@@ -3402,7 +3402,10 @@
while(pPrev)
{
+ pSpan = NULL;
getBlock()->getSpanPtr((UT_uint32) curOffset, &pSpan,
&lenSpan);
+ if ( pSpan == (UT_UCSChar *)NULL || !lenSpan )
+ break;
iPrevType = fribidi_get_type((FriBidiChar)pSpan[0]);
while(curOffset > pPrev->getBlockOffset() &&
!FRIBIDI_IS_STRONG(iType))
@@ -3454,6 +3457,8 @@
while(pNext)
{
getBlock()->getSpanPtr((UT_uint32) curOffset, &pSpan,
&lenSpan);
+ if ( pSpan == (UT_UCSChar *)NULL || !lenSpan )
+ break;
iPrevType = fribidi_get_type((FriBidiChar)pSpan[0]);
bool bDirSet = false;
spanOffset = 0;
@@ -3496,7 +3501,6 @@
// then proceed with the run after it
if(!bDirSet)
pNext->setDirection(iPrevType,
pNext->getDirOverride());
-
if(pNext->getNext() && pNext->getNext()->getType() ==
FPRUN_TEXT)
{
This archive was generated by hypermail 2.1.4 : Fri Aug 02 2002 - 01:18:56 EDT