[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 11 13:06:57 UTC 2018


 sc/source/core/data/dpgroup.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 080fa0aa57ca0dfe158ab30c55a89b9d9288aca0
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Mon Dec 10 22:22:17 2018 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Dec 11 14:06:35 2018 +0100

    crashtesting: ooo55266-3.ods some members are nullptr
    
    Crashes since commit 6481bda69ade61cb5420156272fcf17edd43d620
    
        tdf#121612: update pivot caches during saving to XLSX
    
    without refresh, pivot cache export was skipped entirely
    
    Change-Id: Ic68d4974d5cb9278d61938a59aa8f1a01b920f1f
    Reviewed-on: https://gerrit.libreoffice.org/64903
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 837a65cdc0bef4ef6c48f7b867c7948c70352f05)
    Reviewed-on: https://gerrit.libreoffice.org/64945

diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index a834efc7cdc2..4a07417e4981 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -1023,7 +1023,11 @@ long ScDPGroupTableData::Compare(long nDim, long nDataId1, long nDataId2)
 {
     if ( getIsDataLayoutDimension(nDim) )
         return 0;
-    return ScDPItemData::Compare( *GetMemberById(nDim,  nDataId1),*GetMemberById(nDim,  nDataId2) );
+    const ScDPItemData* rItem1 = GetMemberById(nDim, nDataId1);
+    const ScDPItemData* rItem2 = GetMemberById(nDim, nDataId2);
+    if (rItem1 == nullptr || rItem2 == nullptr)
+        return 0;
+    return ScDPItemData::Compare( *rItem1,*rItem2);
 }
 
 #if DUMP_PIVOT_TABLE


More information about the Libreoffice-commits mailing list