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

New commits:
commit dc051857c36a2f1e27cf149c13bd0e199db60109
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Jun 14 12:56:41 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Jun 15 13:40:45 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/+/135825
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index e6b312e51add..fc31af3c6e28 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