From 6df76366ce242536fd4e29fb4f225f07fba2a0ba Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 11 Nov 2015 20:20:24 +0000 Subject: fix for the broken MS_CLIST_CONTACTSCOMPARE git-svn-id: http://svn.miranda-ng.org/main/trunk@15712 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_app/src/clistmod.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp index 701ef7da12..e99ea438df 100644 --- a/src/mir_app/src/clistmod.cpp +++ b/src/mir_app/src/clistmod.cpp @@ -396,8 +396,10 @@ int fnShowHide(WPARAM, LPARAM) static INT_PTR CompareContacts(WPARAM wParam, LPARAM lParam) { ClcContact *p1, *p2; - if (!cli.pfnFindItem(cli.hwndContactTree, NULL, wParam, &p1, NULL, NULL) && !cli.pfnFindItem(cli.hwndContactTree, NULL, lParam, &p2, NULL, NULL)) - return cli.pfnCompareContacts(p1, p2); + ClcData *dat = (ClcData*)GetWindowLongPtr(cli.hwndContactTree, 0); + if (dat != NULL) + if (!cli.pfnFindItem(cli.hwndContactTree, dat, wParam, &p1, NULL, NULL) && !cli.pfnFindItem(cli.hwndContactTree, dat, lParam, &p2, NULL, NULL)) + return cli.pfnCompareContacts(p1, p2); return 0; } -- cgit v1.2.3