https://bugs.documentfoundation.org/show_bug.cgi?id=159172

--- Comment #2 from Julien Nabet <[email protected]> ---
I also got a crash with all users but not right away after having select "Run
macro", I tried to expand "Application Macros".

I noticed this on gdb:
#7  0x00007f73fa637693 in CuiConfigGroupListBox::FillScriptList
(this=0x556a0da106a0, xRootNode=uno::Reference to
(browsenodefactory::(anonymous namespace)::LocationBrowseNode *)
0x556a0ddf5ee8, 
    pParentEntry=0x7ffd53181780) at
/home/julien/lo/libreoffice/cui/source/customize/cfgutil.cxx:582
582                                 if ( rxNode->getType() ==
browse::BrowseNodeTypes::CONTAINER )
(gdb) p grandchildren
$1 = uno::Sequence of length 1 = {empty uno::Reference}

Now I don't know if an empty uno::Ref may be expected in grandchildren (which
comes from theChild->getChildNodes()).
If it's expected, this patch prevents from the crash:
diff --git a/cui/source/customize/cfgutil.cxx
b/cui/source/customize/cfgutil.cxx
index 3a2cdbc1b05e..e22e6d5ef81e 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -579,7 +579,7 @@ void CuiConfigGroupListBox::FillScriptList(const
css::uno::Reference< css::scrip

                         for ( const auto& rxNode : grandchildren )
                         {
-                            if ( rxNode->getType() ==
browse::BrowseNodeTypes::CONTAINER )
+                            if ( rxNode.is() && rxNode->getType() ==
browse::BrowseNodeTypes::CONTAINER )
                             {
                                 bChildOnDemand = true;
                                 break;
@@ -893,7 +893,7 @@ void CuiConfigGroupListBox::GroupSelected()

                         for ( const Reference< browse::XBrowseNode >&
childNode : children )
                         {
-                            if (childNode->getType() ==
browse::BrowseNodeTypes::SCRIPT)
+                            if (childNode.is() && childNode->getType() ==
browse::BrowseNodeTypes::SCRIPT)
                             {
                                 OUString uri, description;

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to