tdf#163486: PVS: nullptr dereference
V595: The 'pMethod' pointer was utilized before it was verified against nullptr. Check lines: 392, 394. Change-Id: I7c3cdcf9aacb76ca261733924dc238e836036433 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175080 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
@@ -389,9 +389,9 @@ Sequence< OUString > GetMethodNames( const ScriptDocument& rDocument, const OUSt
|
||||
for ( sal_uInt32 i = 0 ; i < nCount; ++i )
|
||||
{
|
||||
SbMethod* pMethod = static_cast<SbMethod*>(pMod->GetMethods()->Get(i));
|
||||
assert(pMethod && "Method not found! (NULL)");
|
||||
if( pMethod->IsHidden() )
|
||||
continue;
|
||||
assert(pMethod && "Method not found! (NULL)");
|
||||
aSeqMethods.getArray()[ iTarget++ ] = pMethod->GetName();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user