summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-01-04 10:29:30 +0100
committerAndras Timar <andras.timar@collabora.com>2018-01-04 10:32:20 +0100
commited16e39ac696c58985a1eab2cefb880126e06428 (patch)
tree68552046a7ffc0402ba0d5cfb34d9beead2a3f98
parent5022038726af951bf6ec06d94219c1d387349e28 (diff)
lokdialogs: Another place that needs vcl::DeleteOnDeinit.
Change-Id: I76929d5dfa9f2a75c53b018f34befbc992abd85e Reviewed-on: https://gerrit.libreoffice.org/47372 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--svx/source/dialog/dialmgr.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/svx/source/dialog/dialmgr.cxx b/svx/source/dialog/dialmgr.cxx
index 150022b6ecce..f928356c964d 100644
--- a/svx/source/dialog/dialmgr.cxx
+++ b/svx/source/dialog/dialmgr.cxx
@@ -21,14 +21,15 @@
#include <svl/solar.hrc>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
+#include <vcl/lazydelete.hxx>
-static std::unique_ptr<ResMgr> pResMgr;
+static vcl::DeleteOnDeinit<ResMgr> pResMgr(nullptr);
ResMgr* DialogsResMgr::GetResMgr()
{
const LanguageTag& rLocale = Application::GetSettings().GetUILanguageTag();
- if (!pResMgr || pResMgr->GetLocale() != rLocale)
+ if (!pResMgr.get() || pResMgr.get()->GetLocale() != rLocale)
pResMgr.reset(ResMgr::CreateResMgr("svx", rLocale));
return pResMgr.get();
}