From 8f750d5c3a3f0b2cced87ccfcc846c7e0c4817a7 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 15 Jun 2001 19:44:35 +0000 Subject: [PATCH] clip_children: don't crash if child is not in list (can happen on WM_NCCREATE). --- dlls/x11drv/winpos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/x11drv/winpos.c b/dlls/x11drv/winpos.c index 32ac957f503..837df3f89ed 100644 --- a/dlls/x11drv/winpos.c +++ b/dlls/x11drv/winpos.c @@ -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) {