From 6b29c4da76fbdcb55b4a89f485a5cff58c4296b9 Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 12 Jun 2019 20:24:33 +0200 Subject: Core/DataStores: Fixed crash when loading additional db2 locales --- src/server/shared/DataStores/DB2Store.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/server/shared/DataStores/DB2Store.cpp b/src/server/shared/DataStores/DB2Store.cpp index 4a9f01723a2..e1fb5b9e43d 100644 --- a/src/server/shared/DataStores/DB2Store.cpp +++ b/src/server/shared/DataStores/DB2Store.cpp @@ -121,12 +121,10 @@ bool DB2StorageBase::LoadStringsFrom(std::string const& path, uint32 locale, cha return false; DB2FileLoader db2; - { - DB2FileSystemSource source(path + _fileName); - // Check if load was successful, only then continue - if (!db2.Load(&source, _loadInfo)) - return false; - } + DB2FileSystemSource source(path + _fileName); + // Check if load was successful, only then continue + if (!db2.Load(&source, _loadInfo)) + return false; // load strings from another locale db2 data if (_loadInfo->GetStringFieldCount(true)) -- cgit v1.2.3