summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/utils/windowlist.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/utils/windowlist.cpp b/src/modules/utils/windowlist.cpp
index 667af0322d..29569ff93e 100644
--- a/src/modules/utils/windowlist.cpp
+++ b/src/modules/utils/windowlist.cpp
@@ -50,10 +50,10 @@ static INT_PTR DestroyWindowList(WPARAM wParam, LPARAM)
static INT_PTR AddToWindowList(WPARAM, LPARAM lParam)
{
- if (lParam == 0) return 1;
WINDOWLISTENTRY *pEntry = (WINDOWLISTENTRY*)lParam;
TWindowList *pList = (TWindowList*)pEntry->hList;
- pList->insert(new TWindowListItem(pEntry->hContact, pEntry->hwnd));
+ if (pList != NULL)
+ pList->insert(new TWindowListItem(pEntry->hContact, pEntry->hwnd));
return 0;
}