summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/property/propertycontainerhelper.cxx2
-rw-r--r--comphelper/source/property/propshlp.cxx2
2 files changed, 3 insertions, 1 deletions
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx
index ee81100ae617..1ce9ad4ea8c5 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -399,7 +399,7 @@ void OPropertyContainerHelper::getFastPropertyValue(Any& _rValue, sal_Int32 _nHa
PropertiesIterator aPos = const_cast<OPropertyContainerHelper*>(this)->searchHandle(_nHandle);
if (aPos == m_aProperties.end())
{
- OSL_FAIL( "OPropertyContainerHelper::getFastPropertyValue: unknown handle!" );
+ assert( false && "OPropertyContainerHelper::getFastPropertyValue: unknown handle" );
// should not happen if the derived class has built a correct property set info helper to be used by
// our base class OPropertySetHelper
return;
diff --git a/comphelper/source/property/propshlp.cxx b/comphelper/source/property/propshlp.cxx
index b0139c747969..d15db5c7e2df 100644
--- a/comphelper/source/property/propshlp.cxx
+++ b/comphelper/source/property/propshlp.cxx
@@ -176,6 +176,8 @@ Any OPropertySetHelper::getPropertyValueImpl(std::unique_lock<std::mutex>& rGuar
IPropertyArrayHelper& rPH = getInfoHelper();
// map the name to the handle
sal_Int32 nHandle = rPH.getHandleByName(rPropertyName);
+ if (nHandle == -1)
+ throw UnknownPropertyException(rPropertyName);
// call the method of the XFastPropertySet interface
Any aAny;
getFastPropertyValue(rGuard, aAny, nHandle);