[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sc/source

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 8 08:41:58 UTC 2020


 sc/source/core/data/documen8.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 39adc2759753113604e0a7c628a4a4ef05db8b8e
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Mon Dec 7 19:26:40 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 8 09:41:18 2020 +0100

    avoid possible nullptr dereference
    
    e.g. https://dev-builds.libreoffice.org/crashtest/9c98bf224d1dc8c5cb91d49273836eeb6111d697/backtraces/task1202-core.backtrace.txt
    
    Regression from cb25771fedd12725a72a1eb4f532698d8221c0f2.
    
    Change-Id: I6e00f43438882b9c96005ce921fbfd419ca634c7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107358
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
    (cherry picked from commit 6265cfca9d775198e81166b914f5dcaea58802db)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107309
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index ee2383a6fad1..7dfab834661a 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -425,7 +425,8 @@ void ScDocument::CalculateInColumnInThread( ScInterpreterContext& rContext, cons
     // If any of the thread_local data would cause problems if they stay around for too long
     // (and e.g. outlive the ScDocument), clean them up here, they cannot be cleaned up
     // later from the main thread.
-    maThreadSpecific.xRecursionHelper->Clear();
+    if(maThreadSpecific.xRecursionHelper)
+        maThreadSpecific.xRecursionHelper->Clear();
 }
 
 void ScDocument::HandleStuffAfterParallelCalculation( SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter* pInterpreter )


More information about the Libreoffice-commits mailing list