diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 6d448885abdb..d67ba3250566 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -2919,14 +2919,11 @@ static MergeResult lcl_Compare_Attributes( SfxItemIter iter1(rSet1); SfxItemIter iter2(rSet2); for (SfxPoolItem const* pItem1 = iter1.GetCurItem(), - * pItem2 = iter2.GetCurItem(); - pItem1 && pItem2; - pItem1 = iter1.NextItem(), - pItem2 = iter2.NextItem()) + * pItem2 = iter2.GetCurItem();;) { - if (pItem1->Which() == RES_CHRATR_RSID) + if (pItem1 && pItem1->Which() == RES_CHRATR_RSID) pItem1 = iter1.NextItem(); - if (pItem2->Which() == RES_CHRATR_RSID) + if (pItem2 && pItem2->Which() == RES_CHRATR_RSID) pItem2 = iter2.NextItem(); if (!pItem1 && !pItem2) { @@ -2942,8 +2939,9 @@ static MergeResult lcl_Compare_Attributes( assert(IsInvalidItem(pItem1) || IsInvalidItem(pItem2) || pItem1->Which() != pItem2->Which() || *pItem1 != *pItem2); return DIFFER; } + pItem1 = iter1.NextItem(); + pItem2 = iter2.NextItem(); } - eMerge = DIFFER_ONLY_RSID; } ++aIter1; ++aIter2; |