[NTOSKRNL]
authorJérôme Gardou <jerome.gardou@reactos.org>
Sun, 4 Mar 2012 17:57:44 +0000 (17:57 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Sun, 4 Mar 2012 17:57:44 +0000 (17:57 +0000)
- fix code assuming System process pointer is never NULL, which is the case when we're creating it.

svn path=/trunk/; revision=56001

reactos/ntoskrnl/ps/process.c

index a5ff7d1..535c476 100644 (file)
@@ -464,8 +464,9 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
         /* Assume no section object */
         SectionObject = NULL;
 
-        /* Is the parent the initial process? */
-        if (Parent != PsInitialSystemProcess)
+        /* Is the parent the initial process?
+         * Check for NULL also, as at initialization PsInitialSystemProcess is NULL */
+        if (Parent != PsInitialSystemProcess && (Parent != NULL))
         {
             /* It's not, so acquire the process rundown */
             if (ExAcquireRundownProtection(&Parent->RundownProtect))