From 0b23894fe5401b48cfdd7eb4c82a65d237828d38 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 27 Jan 2020 19:33:57 +0300 Subject: fixes #2188 (Clist_modern: crash at "clc.cpp (1135)) --- src/mir_app/src/clc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index b9a7ae9c85..3e529e2e02 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -1117,6 +1117,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam } } break; + case DROPTARGET_OUTSIDE: g_clistApi.pfnGetRowByIndex(dat, dat->iDragItem, &contact, nullptr); { @@ -1130,10 +1131,12 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nm); } break; + default: g_clistApi.pfnGetRowByIndex(dat, dat->iDragItem, &contact, &group); - if (!group->parent) + if (group && !group->parent) break; + if (contact->type == CLCIT_GROUP) { //dropee is a group wchar_t szNewName[120]; mir_wstrncpy(szNewName, contact->szText, _countof(szNewName)); -- cgit v1.2.3