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>
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index adc098be..840dff4 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -431,7 +431,7 @@
            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();