svl/source/items/itemset.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit e42792b63dbb136a7bcefe485e7b2936df2a0975
Author: Kohei Yoshida <kohei.yosh...@suse.com>
Date:   Mon Feb 6 14:34:10 2012 -0500

    Perhaps it will help to set the pointer to NULL when the item is not set.

diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index f094d93..6ef1445 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -548,7 +548,10 @@ SfxItemState SfxItemSet::GetItemState( sal_uInt16 nWhich,
 
 bool SfxItemSet::HasItem(sal_uInt16 nWhich, const SfxPoolItem*& rpItem) const
 {
-    return SFX_ITEM_SET == GetItemState(nWhich, true, &rpItem);
+    bool bRet = SFX_ITEM_SET == GetItemState(nWhich, true, &rpItem);
+    if (!bRet)
+        rpItem = NULL;
+    return bRet;
 }
 
 // -----------------------------------------------------------------------
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to