Author: jimtabor
Date: Mon Jul 31 09:51:18 2006
New Revision: 23389
URL:
http://svn.reactos.org/svn/reactos?rev=23389&view=rev
Log:
Sync up Accel.c to head.
Modified:
branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/accel.c
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/accel.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/wi…
==============================================================================
--- branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/accel.c (original)
+++ branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/accel.c Mon Jul 31 09:51:18
2006
@@ -187,6 +187,9 @@
U32_ACCEL_CACHE_ENTRY ** ppEntry;
ULONG_PTR nUsage = 0;
+ if (!hAccel)
+ return FALSE;
+
EnterCriticalSection(&U32AccelCacheLock);
/* see if this accelerator table has been cached */
@@ -281,6 +284,8 @@
*/
HACCEL WINAPI CreateAcceleratorTableW(LPACCEL lpaccl, int cEntries)
{
+ if (!cEntries || !lpaccl) return (HACCEL)0;
+
return NtUserCreateAcceleratorTable(lpaccl, cEntries);
}
@@ -325,6 +330,8 @@
HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccl, int cEntries)
{
int i;
+
+ if (!cEntries || !lpaccl) return (HACCEL)0;
for(i = 0; i < cEntries; ++ i)
if(!lpaccl[i].fVirt)