summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2010-11-27 16:10:58 +0100
committerDavid Tardon <dtardon@redhat.com>2010-11-27 18:32:31 +0100
commit60f8ef2cbe116da6810f83f177f827bf18d69c1a (patch)
tree18d9f09ebd3b8a787c642f17a7c023636efaebfa
parent580a800a1d059ec54d54298db71765fafb2872a8 (diff)
Resolves: rhbz#657541# avoid null ptr. deref. when iterating through empty itemset
-rw-r--r--sw/source/core/txtnode/thints.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 0a2b87520d..f296171546 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -2103,7 +2103,7 @@ struct RemovePresentAttrs
const SwTxtAttr* const pAutoStyle(i_rAttrSpan.second);
SfxItemIter aIter(m_rAttrSet);
const SfxPoolItem* pItem(aIter.GetCurItem());
- while (true)
+ while (pItem)
{
const USHORT nWhich(pItem->Which());
if (CharFmt::IsItemIncluded(nWhich, pAutoStyle))
@@ -2171,7 +2171,7 @@ lcl_FillWhichIds(const SfxItemSet& i_rAttrSet, std::vector<USHORT>& o_rClearIds)
o_rClearIds.reserve(i_rAttrSet.Count());
SfxItemIter aIter(i_rAttrSet);
const SfxPoolItem* pItem(aIter.GetCurItem());
- while (true)
+ while (pItem)
{
o_rClearIds.push_back(pItem->Which());