From ed74eb9602127d996be15f5c64811cf38c6b4b04 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 30 May 2016 11:58:25 +0000 Subject: crash fix for clist_blind git-svn-id: http://svn.miranda-ng.org/main/trunk@16890 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_blind/src/init.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/Clist_blind') diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp index 6a0a3a4d43..cc4dba1b31 100644 --- a/plugins/Clist_blind/src/init.cpp +++ b/plugins/Clist_blind/src/init.cpp @@ -335,7 +335,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L switch (msg) { case WM_CREATE: - dat = (ClcData*)mir_calloc(sizeof(ClcData)); + dat = new ClcData(); SetWindowLongPtr(hwnd, 0, (LONG_PTR)dat); dat->hwnd_list = CreateWindow(_T("LISTBOX"), _T(""), @@ -513,8 +513,7 @@ void RebuildEntireListInternal(HWND hwnd, ClcData *tmp_dat, BOOL call_orig) size_t size = _countof(tmp); while (true) { if (group->scanIndex == group->cl.getCount()) { - group = group->parent; - if (group == NULL) + if ((group = group->parent) == NULL) break; text -= 2; size += 2; -- cgit v1.2.3