Do not dereference NULL pointers.
Modified: trunk/reactos/subsys/win32k/ntuser/winpos.c
--- trunk/reactos/subsys/win32k/ntuser/winpos.c 2005-07-26 22:21:02 UTC (rev 16762) +++ trunk/reactos/subsys/win32k/ntuser/winpos.c 2005-07-26 22:40:03 UTC (rev 16763) @@ -145,6 +145,14 @@
{
Old = Wnd;
IntLockRelatives(Old);
+ if (Old->NextSibling == NULL)
+ {
+ Wnd = NULL;
+ IntUnLockRelatives(Old);
+ if (Old != Window)
+ IntReleaseWindowObject(Old);
+ break;
+ }
Wnd = IntGetWindowObject(Old->NextSibling->Self); IntUnLockRelatives(Old); if (Old != Window)