#i101587# fix illegal handle access

This commit is contained in:
Ocke Janssen 2009-05-06 06:23:26 +00:00
parent 242ee2ea8f
commit 06929bc1b0
2 changed files with 5 additions and 4 deletions

View file

@ -168,10 +168,11 @@ namespace comphelper
// 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 );
}
//--------------------------------------------------------------------

View file

@ -76,12 +76,12 @@ namespace
// 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);
}
};
}