summaryrefslogtreecommitdiff
path: root/sot/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-10-21 14:36:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-10-22 08:01:19 +0200
commit19bc8856c4b5444f80375919c2aed00c7de53a28 (patch)
tree94256a4db6d6feb4f148e405f1a540c9b0db3869 /sot/source
parent76319347a83aecee7a423a614d67287182b31b00 (diff)
move vcl::DeleteOnDeinit to tools
so we can fix a shutdown use-after-free in sot. Change-Id: I32f83bd94627d72d7bee7ea2ebd6ab77a7f78435 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175335 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot/source')
-rw-r--r--sot/source/base/exchange.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 061a794af57c..c7048b166c6f 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -21,6 +21,7 @@
#include <tools/debug.hxx>
#include <tools/globname.hxx>
+#include <tools/lazydelete.hxx>
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
#include <comphelper/classids.hxx>
@@ -210,9 +211,9 @@ const DataFlavorRepresentation* FormatArray_Impl()
static tDataFlavorList& InitFormats_Impl()
{
- static tDataFlavorList gImplData;
+ static tools::DeleteOnDeinit<tDataFlavorList> gImplData;
- return gImplData;
+ return *gImplData.get();
}
/*************************************************************************