diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-27 22:28:15 +0200 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-27 22:28:15 +0200 |
commit | d77cd7730ff36f38b9a8a8619c8b801646f7b928 (patch) | |
tree | 2ca89c3ebcceeccb32aac7dc82599ae3a042d9ef /src | |
parent | 23b0057349dddae70298c452db43fd9699780a05 (diff) |
fixes #1310 (Wrong language after profile conversion)
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/miranda.h | 1 | ||||
-rw-r--r-- | src/mir_core/src/db.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mir_app/src/miranda.h b/src/mir_app/src/miranda.h index e1674f4b06..645fd36013 100644 --- a/src/mir_app/src/miranda.h +++ b/src/mir_app/src/miranda.h @@ -201,5 +201,4 @@ extern "C" {
MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(PLUGININFOEX* pInfo);
MIR_CORE_DLL(int) GetSubscribersCount(struct THook *hHook);
- MIR_CORE_DLL(void) db_setCurrent(MDatabaseCommon *_db);
};
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"));
|