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

New commits:
commit 39adc2759753113604e0a7c628a4a4ef05db8b8e
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Mon Dec 7 19:26:40 2020 +0100
Commit:     Caolán McNamara <caol...@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.lu...@collabora.com>
    (cherry picked from commit 6265cfca9d775198e81166b914f5dcaea58802db)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107309
    Reviewed-by: Caolán McNamara <caol...@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 )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to