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

WM_NCCREATE).
This commit is contained in:
Alexandre Julliard 2001-06-15 19:44:35 +00:00
parent 289a252902
commit 8f750d5c3a
1 changed files with 2 additions and 2 deletions

View File

@ -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)
{