diff options
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 3634081ff7..ab212c69a6 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -402,21 +402,19 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) }
if (hwnd != nullptr) {
+ CTabBaseDlg *dat = c->getDat();
if (!strcmp(setting, "MirVer"))
PostMessage(hwnd, DM_CLIENTCHANGED, 0, 0);
- if (fChanged || fExtendedStatusChange)
- c->getDat()->UpdateTitle();
+ if (dat && fChanged || fExtendedStatusChange)
+ dat->UpdateTitle();
if (fExtendedStatusChange)
PostMessage(hwnd, DM_UPDATESTATUSMSG, 0, 0);
if (fChanged) {
- if (c->getStatus() == ID_STATUS_OFFLINE) { // clear typing notification in the status bar when contact goes offline
- CTabBaseDlg *dat = c->getDat();
- if (dat) {
- dat->m_nTypeSecs = 0;
- dat->m_bShowTyping = 0;
- dat->m_wszStatusBar[0] = 0;
- PostMessage(dat->GetHwnd(), DM_UPDATELASTMESSAGE, 0, 0);
- }
+ if (dat && c->getStatus() == ID_STATUS_OFFLINE) { // clear typing notification in the status bar when contact goes offline
+ dat->m_nTypeSecs = 0;
+ dat->m_bShowTyping = 0;
+ dat->m_wszStatusBar[0] = 0;
+ PostMessage(dat->GetHwnd(), DM_UPDATELASTMESSAGE, 0, 0);
}
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_LOGSTATUSCHANGE, MAKELONG(c->getStatus(), c->getOldStatus()), (LPARAM)c);
}
|