- Prevent crashes when heapPtr is NULL, also fix broken heap magic output. Thanks Mephisto!

svn path=/trunk/; revision=34256
This commit is contained in:
Aleksey Bragin 2008-07-02 10:00:12 +00:00
parent 30db39bf92
commit fc3136e93d

View file

@ -335,7 +335,10 @@ static HEAP *HEAP_GetPtr(
HEAP *heapPtr = (HEAP *)heap;
if (!heapPtr || (heapPtr->magic != HEAP_MAGIC))
{
ERR("Invalid heap %p, magic:%4s!\n", heap,heapPtr->magic );
if (heapPtr)
ERR("Invalid heap %p, magic:%.4s!\n", heap, &heapPtr->magic );
else
ERR("Invalid heap %p!\n", heap );
//KeDumpStackFrames(NULL);
return NULL;
}