summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-27 22:28:15 +0200
committerGeorge Hazan <ghazan@miranda.im>2018-04-27 22:28:15 +0200
commitd77cd7730ff36f38b9a8a8619c8b801646f7b928 (patch)
tree2ca89c3ebcceeccb32aac7dc82599ae3a042d9ef /src/mir_core
parent23b0057349dddae70298c452db43fd9699780a05 (diff)
fixes #1310 (Wrong language after profile conversion)
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/db.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mir_core/src/db.cpp b/src/mir_core/src/db.cpp
index 04efa68510..69e998c53c 100644
--- a/src/mir_core/src/db.cpp
+++ b/src/mir_core/src/db.cpp
@@ -437,9 +437,11 @@ MIR_CORE_DLL(MCONTACT) db_find_next(MCONTACT hContact, const char *szProto)
return (currDb == nullptr) ? NULL : currDb->FindNextContact(hContact, szProto);
}
-extern "C" MIR_CORE_DLL(void) db_setCurrent(MDatabaseCommon *_db)
+MIR_CORE_DLL(void) db_setCurrent(MDatabaseCommon *_db)
{
currDb = _db;
+ if (currDb == nullptr)
+ return;
// try to get the langpack's name from a profile
ptrW langpack(db_get_wsa(NULL, "Langpack", "Current"));