28 lines
917 B
Diff
28 lines
917 B
Diff
|
r21892 | sum1 | 2007-09-04 01:28:58 +0200 (Tue, 04 Sep 2007) | 4 lines
|
||
|
Fix Red Hat Bug 248103, TOC layout crash when importing RTF.
|
||
|
|
||
|
--- abiword-2.4.6.orig/abi/src/text/fmt/xp/fl_DocLayout.cpp 2007-09-04 17:19:39.000000000 +0200
|
||
|
+++ abiword-2.4.6/abi/src/text/fmt/xp/fl_DocLayout.cpp 2007-09-04 17:23:30.000000000 +0200
|
||
|
@@ -595,14 +595,19 @@ void FL_DocLayout::fillLayouts(void)
|
||
|
fl_ContainerLayout * pCL = pLastSec->getLastLayout();
|
||
|
fl_BlockLayout * pBL = NULL;
|
||
|
bool bRebreak = false;
|
||
|
- if(pCL->getContainerType() == FL_CONTAINER_BLOCK)
|
||
|
+ if(pCL && (pCL->getContainerType() == FL_CONTAINER_BLOCK))
|
||
|
+
|
||
|
{
|
||
|
pBL = static_cast<fl_BlockLayout *>(pCL);
|
||
|
}
|
||
|
- else
|
||
|
+ else if(pCL)
|
||
|
{
|
||
|
pBL = pCL->getPrevBlockInDocument();
|
||
|
}
|
||
|
+ else
|
||
|
+ {
|
||
|
+ UT_ASSERT_HARMLESS(pCL);
|
||
|
+ }
|
||
|
if(pBL)
|
||
|
{
|
||
|
fp_Line * pLine = static_cast<fp_Line *>(pBL->getLastContainer());
|