Commits

oj  committed 8d3b716

#i101587# fix illegal handle access

  • Participants
  • Parent commits d897bdf

Comments (0)

Files changed (2)

File comphelper/source/property/propertybag.cxx

             // will throw an UnknownPropertyException if necessary
         if ( ( rProp.Attributes & PropertyAttribute::REMOVEABLE ) == 0 )
             throw NotRemoveableException( ::rtl::OUString(), NULL );
+        const sal_Int32 nHandle = rProp.Handle;
 
-        revokeProperty( rProp.Handle );
+        revokeProperty( nHandle );
 
-        m_pImpl->aDefaults.erase( rProp.Handle );
+        m_pImpl->aDefaults.erase( nHandle );
     }
 
 	//--------------------------------------------------------------------

File comphelper/source/property/propertycontainerhelper.cxx

 	// comparing two property descriptions (by name)
     struct PropertyDescriptionNameMatch : public ::std::unary_function< PropertyDescription, bool >
 	{
-        const ::rtl::OUString& m_rCompare;
+        ::rtl::OUString m_rCompare;
         PropertyDescriptionNameMatch( const ::rtl::OUString& _rCompare ) : m_rCompare( _rCompare ) { }
 
         bool operator() (const PropertyDescription& x ) const
 		{
-			return x.aProperty.Name == m_rCompare;
+			return x.aProperty.Name.equals(m_rCompare);
 		}
 	};
 }