summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-01-25 21:20:51 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-01-25 21:20:51 +0300
commit92c023bcf79eb15cb299f97fae98a7d0c26cbd42 (patch)
tree2c961afa561e0fafc327ef532bbe39bad5b708f2 /src
parent7979f60eb4e2f13bcd4aa35d16b72e4608c5fa50 (diff)
crash fix
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/chat.h2
-rw-r--r--src/mir_app/src/chat_manager.cpp5
-rw-r--r--src/mir_app/src/chat_svc.cpp1
3 files changed, 5 insertions, 3 deletions
diff --git a/src/mir_app/src/chat.h b/src/mir_app/src/chat.h
index 00d2f183fe..9e7a7f731f 100644
--- a/src/mir_app/src/chat.h
+++ b/src/mir_app/src/chat.h
@@ -28,6 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void Srmm_CreateToolbarIcons(HWND hwndDlg, int flags);
void Srmm_ProcessToolbarHotkey(MCONTACT hContact, INT_PTR iButtonFrom, HWND hwndDlg);
+void CheckChatCompatibility();
+
class CLogWindow : public CSrmmLogWindow {};
extern HPLUGIN g_pChatPlugin;
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index 2fd43346cb..39d2ea158c 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -957,7 +957,7 @@ static void ResetApi()
/////////////////////////////////////////////////////////////////////////////////////////
-static void CheckUpdate()
+void CheckChatCompatibility()
{
if (db_get_b(0, "Compatibility", "GroupChats") < 1) {
for (auto &cc : Contacts()) {
@@ -978,7 +978,7 @@ static void CheckUpdate()
db_unset(cc, pa->szModuleName, "ChatRoomID");
}
- else Netlib_Logf(0, "Protocol %s {%s} not found", pa->szModuleName, pd->szUniqueId);
+ else Netlib_Logf(0, "Protocol %s not found", pa->szModuleName);
}
}
db_set_b(0, "Compatibility", "GroupChats", 1);
@@ -1038,7 +1038,6 @@ MIR_APP_DLL(CHAT_MANAGER*) Chat_CustomizeApi(const CHAT_MANAGER_INITDATA *pInit)
LoadChatIcons();
RegisterFonts();
OptionsInit();
- CheckUpdate();
return &g_chatApi;
}
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index 021079ba46..4544f8f550 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -845,6 +845,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
{
SrmmModulesLoaded();
LoadChatIcons();
+ CheckChatCompatibility();
HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);