diff options
author | George Hazan <ghazan@miranda.im> | 2017-02-22 19:49:37 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-02-22 19:49:37 +0300 |
commit | c7b17549ed7029682d9012d3d53d3e34523f699f (patch) | |
tree | 1e53327716515c39d928927f49532c7a7b3ee2f6 /src/mir_app | |
parent | 8f0458f54c32f68512573abb775384d4be114a08 (diff) |
Discord:
- support for channel creation & destruction on the fly
- code cleaning
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/chat_svc.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp index a3412dadd5..c7d2eab119 100644 --- a/src/mir_app/src/chat_svc.cpp +++ b/src/mir_app/src/chat_svc.cpp @@ -672,8 +672,12 @@ MIR_APP_DLL(int) Chat_SendUserMessage(const char *szModule, const wchar_t *wszId MIR_APP_DLL(int) Chat_SetStatusbarText(const char *szModule, const wchar_t *wszId, const wchar_t *wszText)
{
- mir_cslock lck(csChat);
- if (SESSION_INFO *si = chatApi.SM_FindSession(wszId, szModule)) {
+ SESSION_INFO *si;
+ {
+ mir_cslock lck(csChat);
+ si = chatApi.SM_FindSession(wszId, szModule);
+ }
+ if (si != nullptr) {
replaceStrW(si->ptszStatusbarText, wszText);
if (si->ptszStatusbarText)
db_set_ws(si->hContact, si->pszModule, "StatusBar", si->ptszStatusbarText);
|