[Libreoffice-commits] core.git: sc/source

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 7 19:47:06 UTC 2020


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

New commits:
commit 6265cfca9d775198e81166b914f5dcaea58802db
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Mon Dec 7 19:26:40 2020 +0100
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Dec 7 20:46:21 2020 +0100

    avoid possible nullptr dereference
    
    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>

diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 5c72e9d6198b..1008cdff14f5 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -423,7 +423,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