[ros-diffs] [navaraf] 17168: Fix NULL pointer dereference when clicking on desktop window.

navaraf at svn.reactos.com navaraf at svn.reactos.com
Sun Aug 7 17:17:08 CEST 2005


Fix NULL pointer dereference when clicking on desktop window.
Modified: branches/win32k rewrite attempt/win32k/ntuser/focus.c
  _____  

Modified: branches/win32k rewrite attempt/win32k/ntuser/focus.c
--- branches/win32k rewrite attempt/win32k/ntuser/focus.c
2005-08-07 14:01:17 UTC (rev 17167)
+++ branches/win32k rewrite attempt/win32k/ntuser/focus.c
2005-08-07 15:16:52 UTC (rev 17168)
@@ -236,19 +236,8 @@

    }
 
    TopWnd = UserGetAncestor(Window, GA_ROOT);
-   //  if (TopWindow != Window->Self)
-   //    {
-   //      TopWindow = IntGetWindowObject(Top);
-   //      if (TopWindow == NULL)
-   //        {
-   //          SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
-   //          return FALSE;
-   //        }
-   //    }
-   //  else
-   //    {
-   //      TopWindow = Window;
-   //    }
+   if (TopWnd == NULL)
+      TopWnd = UserGetDesktopWindow();
 
    /* TMN: Check return value from this function? */
    IntSetForegroundAndFocusWindow(TopWnd, Window, TRUE);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050807/da4414b1/attachment.html


More information about the Ros-diffs mailing list