diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-27 12:30:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-27 15:32:55 +0200 |
commit | 627a9982f25b22520537592e9c7a566e0d9c950a (patch) | |
tree | 3e2e0628d23f68d6dd17f70360acf5f5910c979e /vcl | |
parent | 91fac2a32c1c6b784bd33cf664ea64a734b1c776 (diff) |
cid#705053 Dereference after null check
re-arrange the code to help coverity out
Change-Id: Iddc9284cbdcbaae7a0dc17e62d0e8f4b4832297c
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/svapp.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index fd0077eab3b1..0355ec08fac9 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -517,7 +517,7 @@ void Application::SetSettings( const AllSettings& rSettings ) ImplSVData* pSVData = ImplGetSVData(); if ( !pSVData->maAppData.mpSettings ) { - InitSettings(); + InitSettings(pSVData); *pSVData->maAppData.mpSettings = rSettings; ResMgr::SetDefaultLocale( rSettings.GetUILanguageTag() ); } @@ -616,16 +616,14 @@ const AllSettings& Application::GetSettings() ImplSVData* pSVData = ImplGetSVData(); if ( !pSVData->maAppData.mpSettings ) { - InitSettings(); + InitSettings(pSVData); } return *(pSVData->maAppData.mpSettings); } -void Application::InitSettings() +void Application::InitSettings(ImplSVData* pSVData) { - ImplSVData* pSVData = ImplGetSVData(); - assert(!pSVData->maAppData.mpSettings && "initialization should not happen twice!"); pSVData->maAppData.mpCfgListener = new LocaleConfigurationListener; |