diff options
author | George Hazan <george.hazan@gmail.com> | 2023-06-22 18:58:12 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-06-22 18:58:17 +0300 |
commit | 9702654d785eecad86702562413f3ee32f5e423f (patch) | |
tree | 201a07ab986efb2f4cdaaf18dd568fddb92d28f6 | |
parent | bc6eedf47c26d1e22dc725a5cf2dd849a2bb214b (diff) |
fixes #3562 (tabSRMM: crash on nicklist hide)
-rw-r--r-- | src/mir_app/src/srmm_base.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index 0696dbbe4c..d109cc6352 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -601,10 +601,13 @@ INT_PTR CSrmmBaseDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) case WM_DRAWITEM:
{
DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)lParam;
- if (dis->CtlID == IDC_SRMM_NICKLIST) {
- if (auto *ui = (USERINFO *)m_nickList.GetItemData(dis->itemID))
- DrawNickList(ui, dis);
- return TRUE;
+ if (dis->CtlID == IDC_SRMM_NICKLIST && dis->itemID != LB_ERR) {
+ UINT_PTR iData = m_nickList.GetItemData(dis->itemID);
+ if (iData != LB_ERR) {
+ if (auto *ui = (USERINFO *)iData)
+ DrawNickList(ui, dis);
+ return TRUE;
+ }
}
}
break;
|