[Libreoffice-commits] .: Branch 'libreoffice-3-3' - sw/source

David Tardon dtardon at kemper.freedesktop.org
Sat Nov 27 09:33:51 PST 2010


 sw/source/core/txtnode/thints.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 60f8ef2cbe116da6810f83f177f827bf18d69c1a
Author: David Tardon <dtardon at redhat.com>
Date:   Sat Nov 27 16:10:58 2010 +0100

    Resolves: rhbz#657541# avoid null ptr. deref. when iterating through empty itemset

diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 0a2b875..f296171 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());
 


More information about the Libreoffice-commits mailing list