Commit 8f750d5c authored by Alexandre Julliard's avatar Alexandre Julliard

clip_children: don't crash if child is not in list (can happen on

WM_NCCREATE).
parent 289a2529
......@@ -66,9 +66,9 @@ static void clip_children( WND *win, WND *last, HRGN hrgn, int whole_window )
int x, y;
/* first check if we have anything to do */
for (ptr = win->child; ptr != last; ptr = ptr->next)
for (ptr = win->child; ptr && ptr != last; ptr = ptr->next)
if (ptr->dwStyle & WS_VISIBLE) break;
if (ptr == last) return; /* no children to clip */
if (!ptr || ptr == last) return; /* no children to clip */
if (whole_window)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment