Kaydet (Commit) 96926d2f authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

don't crash with possibly invalid index, fdo#76209

Change-Id: Idde31b2b07e27a1d9c91145516f8e78c638ce3b4
üst b987b103
......@@ -301,7 +301,7 @@ const XclImpName* XclImpNameManager::FindName( const OUString& rXclName, SCTAB n
const XclImpName* XclImpNameManager::GetName( sal_uInt16 nXclNameIdx ) const
{
OSL_ENSURE( nXclNameIdx > 0, "XclImpNameManager::GetName - index must be >0" );
return ( nXclNameIdx > maNameList.size() ) ? NULL : &(maNameList.at( nXclNameIdx - 1 ));
return ( nXclNameIdx <= 0 || nXclNameIdx > maNameList.size() ) ? NULL : &(maNameList.at( nXclNameIdx - 1 ));
}
void XclImpNameManager::ConvertAllTokens()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment