sfx2/source/notify/eventsupplier.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3a24e72f24dd89a8b21ae31ca27e1dcfde777210
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Apr 28 15:15:24 2019 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sun Apr 28 17:39:03 2019 +0200

    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.kagan...@collabora.com>

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();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to