sc/source/core/data/dpobject.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit adc0d38ea1b434e0f5c996acce87fc9106706801
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Jun 14 12:56:41 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Jun 14 21:29:32 2022 +0200

    crashtesting: assert seen on loading forum-en-38962.ods
    
    mismatched Push/Pop, catch offending exception
    
    Change-Id: Ib2297a8ab04a2f2491e4c922d9e4db82a66ea911
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135841
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index a5ff421649fd..04cd7099dcca 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1022,7 +1022,16 @@ bool ScDPObject::GetMembers( sal_Int32 nDim, sal_Int32 
nHier, vector<ScDPLabelDa
 
     for (sal_Int32 i = 0; i < nCount; ++i)
     {
-        Reference<container::XNamed> xMember(xMembersIA->getByIndex(i), 
UNO_QUERY);
+        Reference<container::XNamed> xMember;
+        try
+        {
+            xMember = Reference<container::XNamed>(xMembersIA->getByIndex(i), 
UNO_QUERY);
+        }
+        catch (const container::NoSuchElementException&)
+        {
+            TOOLS_WARN_EXCEPTION("sc", "ScNameToIndexAccess getByIndex 
failed");
+        }
+
         ScDPLabelData::Member aMem;
 
         if (xMember.is())

Reply via email to