diff options
author | David Tardon <dtardon@redhat.com> | 2010-11-27 16:10:58 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2010-11-27 18:32:31 +0100 |
commit | 837e7a3a6f3bf8f4fc7930b3771a155376a1586e (patch) | |
tree | 3f3cc8aa168a6f0a4e8ccf01d86d2a7de2c2a246 /sw | |
parent | 162670f49bab5d3deb066d6ef8f9fa18ddd5e027 (diff) |
Resolves: rhbz#657541# avoid null ptr. deref. when iterating through empty itemset
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 9a26ee36fc65..a04fd4ea2404 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()); |