summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/miranda.h1
-rw-r--r--src/mir_core/src/db.cpp4
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"));