Kaydet (Commit) 3a24e72f authored tarafından Mike Kaganski's avatar Mike Kaganski

tdf#120703 PVS: dereference before nullptr check

V595 The 'pDoc' pointer was utilized before it was verified against nullptr.
     Check lines: 434, 460.

Change-Id: Iec92cbb8c4f5e47f7852015bf466b1f8ed195517
Reviewed-on: https://gerrit.libreoffice.org/71471
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 2dfae8e4
......@@ -431,7 +431,7 @@ void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i
if ( ( nThirdSlashPos != -1 ) && ( nArgsPos == -1 || nThirdSlashPos < nArgsPos ) )
{
OUString aBasMgrName( INetURLObject::decode( aScript.copy( 8, nThirdSlashPos-8 ), INetURLObject::DecodeMechanism::WithCharset ) );
if ( aBasMgrName == "." )
if (pDoc && aBasMgrName == ".")
aLibrary = pDoc->GetTitle();
else
aLibrary = SfxGetpApp()->GetName();
......
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