diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/clistmod.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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;
}
|