diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-02-04 11:39:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-02-04 15:47:12 +0000 |
commit | 72f0f535d322850bc1b8d44dd1dc71ebe313470b (patch) | |
tree | cc90f009ef68c78dd4d0ee61cc0e6f6089ae1330 /javaunohelper/com/sun/star/lib | |
parent | 1cf6890ac8e7fb97af6509b4dbcaf5776833154e (diff) |
coverity#1326400 Dereference null return value
Change-Id: Ie28d817d7be24b2de19f51e11786c0396a2e016f
Diffstat (limited to 'javaunohelper/com/sun/star/lib')
-rw-r--r-- | javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java index 327995824c42..38f704c9a710 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java @@ -896,9 +896,9 @@ XMultiPropertySet lc= aVetoableLC.getContainer(arEvts[i].PropertyName); else lc= aBoundLC.getContainer(arEvts[i].PropertyName); - if (lc != null) + Iterator it = lc != null ? lc.iterator() : null; + if (it != null) { - Iterator it= lc.iterator(); while( it.hasNext()) { Object listener= it.next(); @@ -913,9 +913,9 @@ XMultiPropertySet lc= listenerContainer.getContainer(XVetoableChangeListener.class); else lc= listenerContainer.getContainer(XPropertyChangeListener.class); - if(lc != null) + it = lc != null ? lc.iterator() : null; + if (it != null) { - Iterator it= lc.iterator(); while(it.hasNext() ) { Object listener= it.next(); @@ -934,9 +934,9 @@ XMultiPropertySet PropertyChangeEvent[] arReduced= new PropertyChangeEvent[nAffectedProps]; System.arraycopy(arEvts, 0, arReduced, 0, nAffectedProps); InterfaceContainer lc= listenerContainer.getContainer(XPropertiesChangeListener.class); - if (lc != null) + Iterator it = lc != null ? lc.iterator() : null; + if (it != null) { - Iterator it= lc.iterator(); while (it.hasNext()) { XPropertiesChangeListener listener = (XPropertiesChangeListener) it.next(); |