mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Fix crash clicking desktop during setup (NULL pointer was unchecked)
svn path=/trunk/; revision=12221
This commit is contained in:
parent
b950b4dd97
commit
51f96d5871
1 changed files with 7 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: focus.c,v 1.26 2004/11/25 22:18:59 navaraf Exp $
|
* $Id: focus.c,v 1.27 2004/12/19 11:05:48 tamlin Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <w32k.h>
|
#include <w32k.h>
|
||||||
|
@ -238,12 +238,18 @@ IntMouseActivateWindow(PWINDOW_OBJECT Window)
|
||||||
if (Top != Window->Self)
|
if (Top != Window->Self)
|
||||||
{
|
{
|
||||||
TopWindow = IntGetWindowObject(Top);
|
TopWindow = IntGetWindowObject(Top);
|
||||||
|
if (TopWindow == NULL)
|
||||||
|
{
|
||||||
|
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TopWindow = Window;
|
TopWindow = Window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TMN: Check return valud from this function? */
|
||||||
IntSetForegroundAndFocusWindow(TopWindow, Window, TRUE);
|
IntSetForegroundAndFocusWindow(TopWindow, Window, TRUE);
|
||||||
|
|
||||||
if (Top != Window->Self)
|
if (Top != Window->Self)
|
||||||
|
|
Loading…
Reference in a new issue