From 3a24e72f24dd89a8b21ae31ca27e1dcfde777210 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 28 Apr 2019 15:15:24 +0300 Subject: 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 --- sfx2/source/notify/eventsupplier.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sfx2/source/notify') 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(); -- cgit