Author: cwittich
Date: Sat Jul 5 04:19:56 2008
New Revision: 34300
URL:
http://svn.reactos.org/svn/reactos?rev=34300&view=rev
Log:
don't try to dereference NULL pointers
now Avira AntiVir installs without crashing the whole system
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/message.c
trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Sat Jul 5
04:19:56 2008
@@ -1550,6 +1550,8 @@
MmCopyToCaller(UnsafeInfo, &Info, sizeof(NTUSERSENDMESSAGEINFO));
return 0;
}
+ if (!Window->Wnd)
+ return 0;
}
/* FIXME: Check for an exiting window. */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] Sat Jul 5
04:19:56 2008
@@ -899,6 +899,9 @@
RETURN(hMonitor);
}
+ if (!Window->Wnd)
+ RETURN(hMonitor);
+
Rect.left = Rect.right = Window->Wnd->WindowRect.left;
Rect.top = Rect.bottom = Window->Wnd->WindowRect.bottom;