diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-28 15:15:24 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-28 17:39:03 +0200 |
commit | 3a24e72f24dd89a8b21ae31ca27e1dcfde777210 (patch) | |
tree | 406a12a2d5a4f7ba58fdedc95b0a053d4f1f793b /sfx2 | |
parent | 2dfae8e4881e78fddd3bbd6dedc5dd0ab814f685 (diff) |
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: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/notify/eventsupplier.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index adc098be5b27..840dff455584 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -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(); |