summaryrefslogtreecommitdiffstats
path: root/PC/_subprocess.c
diff options
context:
space:
mode:
Diffstat (limited to 'PC/_subprocess.c')
-rw-r--r--PC/_subprocess.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/PC/_subprocess.c b/PC/_subprocess.c
index f107c13..a09b016 100644
--- a/PC/_subprocess.c
+++ b/PC/_subprocess.c
@@ -385,6 +385,9 @@ sp_CreateProcess(PyObject* self, PyObject* args)
si.hStdOutput = gethandle(startup_info, "hStdOutput");
si.hStdError = gethandle(startup_info, "hStdError");
+ if (PyErr_Occurred())
+ return NULL;
+
if (env_mapping == Py_None)
environment = NULL;
else {