Author: tkreuzer
Date: Sun Sep 14 12:33:03 2014
New Revision: 64143
URL:
http://svn.reactos.org/svn/reactos?rev=64143&view=rev
Log:
[WIN32K]
Prevent NULL pointer dereference and fix a compiler warning
Modified:
trunk/reactos/win32ss/gdi/ntgdi/gdidbg.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/gdidbg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/gdidbg.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/gdidbg.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/gdidbg.c [iso-8859-1] Sun Sep 14 12:33:03 2014
@@ -324,12 +324,12 @@
r = 0;
DPRINT1("Used entry has KernelData == 0\n");
}
- if (pEntry->KernelData <= MmHighestUserAddress)
+ else if (pEntry->KernelData <= MmHighestUserAddress)
{
r = 0;
DPRINT1("Used entry invalid KernelData\n");
}
- if (((POBJ)(pEntry->KernelData))->hHmgr != Handle)
+ else if (((POBJ)(pEntry->KernelData))->hHmgr != Handle)
{
r = 0;
DPRINT1("Used entry %lu, has invalid hHmg %p (expected: %p)\n",
@@ -606,7 +606,7 @@
}
iChannel = ChannelEntry->Id;
- ASSERT(iChannel >= 0 && iChannel < DbgChCount);
+ ASSERT(iChannel < DbgChCount);
if(level == NULL || *level == L'\0' ||wcslen(level) == 0 )
iLevel = MAX_LEVEL;