sw/source/uibase/app/applab.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 323a1a5ba9eb676095d33ecae0717b325189caf4
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Feb 25 21:08:57 2023 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Feb 26 15:51:37 2023 +0000

    cid#1521508 Dereference after null check
    
    Change-Id: Ica9039a9aea7e1247ea957a8e25aaaafc944a97a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147686
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index 1772ea467dcc..c39ec665da71 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -377,7 +377,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
         pSh->DoUndo();
     }
 
-    if( rItem.m_aWriting.indexOf( '<' ) >= 0 )
+    if (pSh && rItem.m_aWriting.indexOf('<') >= 0)
     {
         // Open database browser on recently used database
         ShowDBObj( *pNewView, pSh->GetDBData() );

Reply via email to