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

New commits:
commit 0fc0d1a9fb14a23357219e797e1b35092f7d8ee6
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Apr 16 12:29:37 2022 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Tue Apr 19 12:10:32 2022 +0200

    Resolves: tdf#148197 crash on launching context menu with no row selected
    
    Change-Id: I4b05e6013ec4fb8f3968484a59c2dacf1e1c97ee
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133048
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
    Reviewed-by: Xisco Fauli <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Michael Stahl <[email protected]>

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 7e197dafdd67..4985e4f2075e 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1934,7 +1934,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, 
rCEvt, bool)
         xPop->remove("footnotetracking");
 
     bool bSetSensitiveCollapseAllCategories = false;
-    if (!m_bIsRoot)
+    if (!m_bIsRoot && xEntry)
     {
         bool bEntry = m_xTreeView->get_iter_first(*xEntry);
         while (bEntry)

Reply via email to