summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/chat_svc.cpp8
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);