Don't try to duplicate NULL handles.
Modified: trunk/reactos/lib/kernel32/process/create.c

Modified: trunk/reactos/lib/kernel32/process/create.c
--- trunk/reactos/lib/kernel32/process/create.c	2005-03-17 22:00:19 UTC (rev 14166)
+++ trunk/reactos/lib/kernel32/process/create.c	2005-03-17 22:40:19 UTC (rev 14167)
@@ -1289,7 +1289,7 @@
    }
 
    /* Now duplicate handles if required */
-   if (InputDup)
+   if (InputDup && Ppb->hStdInput != NULL)
    {
       if (IsConsoleHandle(Ppb->hStdInput))
       {
@@ -1312,7 +1312,7 @@
       }
    }
 
-   if (OutputDup)
+   if (OutputDup && Ppb->hStdOutput != NULL)
    {
       if (IsConsoleHandle(Ppb->hStdOutput))
       {
@@ -1335,7 +1335,7 @@
       }
    }
 
-   if (ErrorDup)
+   if (ErrorDup && Ppb->hStdError != NULL)
    {
       if (IsConsoleHandle(Ppb->hStdError))
       {