[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - svx/source
Jan Holesovsky
kendy at collabora.com
Thu Jan 4 09:34:45 UTC 2018
svx/source/dialog/dialmgr.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit ed16e39ac696c58985a1eab2cefb880126e06428
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Jan 4 10:29:30 2018 +0100
lokdialogs: Another place that needs vcl::DeleteOnDeinit.
Change-Id: I76929d5dfa9f2a75c53b018f34befbc992abd85e
Reviewed-on: https://gerrit.libreoffice.org/47372
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
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();
}
More information about the Libreoffice-commits
mailing list