summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-02-25 15:45:43 +0100
committerMichael Meeks <michael.meeks@collabora.com>2019-03-04 15:23:36 +0100
commit233c9a12fd578e9a518cf6841d186f2f884d594d (patch)
treeba7eafd11ccf38c50b6b0190439865d9315f5fc2 /compilerplugins
parent7b9e13376423d54cf95dfc48c9d3de0a62826943 (diff)
do not call GetFormatTable() from GetNonThreadedContext() (tdf#121949)
ScDocument dtor calls ClearLookupCaches(), which calls GetNonThreadedContext(). But ScDocument instances used for copy&paste GetFormatTable() fails on null mxPoolHelper, because ScDocument ctor doesn't set it in such a case. So set up the pointer in ScInterpreterContext on demand only if actually needed. Change-Id: If3811da5bb00a2d7d404c089ee1bf46037a2cddb Reviewed-on: https://gerrit.libreoffice.org/68350 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit b5c3f38cb8d4121e3303be362e0757d3d3431059) Reviewed-on: https://gerrit.libreoffice.org/68539
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/badstatics.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/compilerplugins/clang/badstatics.cxx b/compilerplugins/clang/badstatics.cxx
index 39b99e6de71e..d25b842da0d0 100644
--- a/compilerplugins/clang/badstatics.cxx
+++ b/compilerplugins/clang/badstatics.cxx
@@ -201,6 +201,8 @@ public:
.Class("ScDocument").GlobalNamespace()) // not owning
|| name == "s_pLOKWindowsMap" // LOK only, guarded by assert, and LOK never tries to perform a VCL cleanup
|| name == "gStaticManager" // vcl/source/graphic/Manager.cxx - stores non-owning pointers
+ || name == "aThreadedInterpreterPool" // ScInterpreterContext(Pool), not owning
+ || name == "aNonThreadedInterpreterPool" // ScInterpreterContext(Pool), not owning
) // these variables appear unproblematic
{
return true;