From c5427646b03c73c179a31505671a9ad785709eb3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 21 Jan 2014 21:30:00 +0000 Subject: fix for crash in StdMsg dynamic unload git-svn-id: http://svn.miranda-ng.org/main/trunk@7822 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/utils/windowlist.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/modules/utils') diff --git a/src/modules/utils/windowlist.cpp b/src/modules/utils/windowlist.cpp index dfea007733..04f5963ca9 100644 --- a/src/modules/utils/windowlist.cpp +++ b/src/modules/utils/windowlist.cpp @@ -35,17 +35,16 @@ static INT_PTR AllocWindowList(WPARAM, LPARAM) static INT_PTR AddToWindowList(WPARAM, LPARAM lParam) { - windowList = (WINDOWLISTENTRY*)mir_realloc(windowList, sizeof(WINDOWLISTENTRY)*(windowListCount+1)); + windowList = (WINDOWLISTENTRY*)mir_realloc(windowList, sizeof(WINDOWLISTENTRY)*(windowListCount + 1)); windowList[windowListCount++] = *(WINDOWLISTENTRY*)lParam; return 0; } static INT_PTR RemoveFromWindowList(WPARAM wParam, LPARAM lParam) { - int i; - for (i=0;i= 0; i--) if (windowList[i].hList == (HANDLE)wParam) SendMessage(windowList[i].hwnd, msg->message, msg->wParam, msg->lParam); return 0; @@ -73,9 +70,8 @@ static INT_PTR BroadcastToWindowList(WPARAM wParam, LPARAM lParam) static INT_PTR BroadcastToWindowListAsync(WPARAM wParam, LPARAM lParam) { - int i; MSG *msg = (MSG*)lParam; - for (i=0;i= 0; i--) if (windowList[i].hList == (HANDLE)wParam) PostMessage(windowList[i].hwnd, msg->message, msg->wParam, msg->lParam); return 0; -- cgit v1.2.3