summaryrefslogtreecommitdiff
path: root/comphelper/source/property/property.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/property/property.cxx')
-rw-r--r--comphelper/source/property/property.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx
index d5ddc9a9ab7b..a0083908246f 100644
--- a/comphelper/source/property/property.cxx
+++ b/comphelper/source/property/property.cxx
@@ -149,7 +149,7 @@ void RemoveProperty(Sequence<Property>& _rProps, const OUString& _rPropName)
Property aNameProp(_rPropName, 0, Type(), 0);
const Property* pResult = std::lower_bound(pProperties, pProperties + nLen, aNameProp, PropertyCompareByName());
- if ( pResult && (pResult != pProperties + nLen) && (pResult->Name == _rPropName) )
+ if ( pResult != _rProps.end() && pResult->Name == _rPropName )
{
OSL_ENSURE(pResult->Name.equals(_rPropName), "::RemoveProperty Properties not sorted");
removeElementAt(_rProps, pResult - pProperties);
@@ -166,7 +166,7 @@ void ModifyPropertyAttributes(Sequence<Property>& seqProps, const OUString& sPro
Property aNameProp(sPropName, 0, Type(), 0);
Property* pResult = std::lower_bound(pProperties, pProperties + nLen, aNameProp, PropertyCompareByName());
- if ( pResult && (pResult != pProperties + nLen) && (pResult->Name == sPropName) )
+ if ( (pResult != seqProps.end()) && (pResult->Name == sPropName) )
{
pResult->Attributes |= nAddAttrib;
pResult->Attributes &= ~nRemoveAttrib;