- Handle UnsafeRect == NULL case in NtUserGetUpdateRect.

svn path=/trunk/; revision=10054
This commit is contained in:
Filip Navara 2004-07-09 20:13:00 +00:00
parent 35a256ae2b
commit 79a4726093

View file

@ -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: painting.c,v 1.83 2004/05/15 08:01:56 gvg Exp $ * $Id: painting.c,v 1.84 2004/07/09 20:13:00 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -914,12 +914,15 @@ NtUserGetUpdateRect(HWND Wnd, LPRECT UnsafeRect, BOOL Erase)
RGNDATA_UnlockRgn(Rgn); RGNDATA_UnlockRgn(Rgn);
NtGdiDeleteObject(Rgn); NtGdiDeleteObject(Rgn);
if (UnsafeRect != NULL)
{
Status = MmCopyToCaller(UnsafeRect, &Rect, sizeof(RECT)); Status = MmCopyToCaller(UnsafeRect, &Rect, sizeof(RECT));
if (! NT_SUCCESS(Status)) if (! NT_SUCCESS(Status))
{ {
SetLastWin32Error(ERROR_INVALID_PARAMETER); SetLastWin32Error(ERROR_INVALID_PARAMETER);
return FALSE; return FALSE;
} }
}
return Rect.left < Rect.right && Rect.top < Rect.bottom; return Rect.left < Rect.right && Rect.top < Rect.bottom;
} }