diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 4bf13ceb96..973ddd47e9 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -617,7 +617,7 @@ when defined(Windows) and not defined(useNimRtl): when useWinUnicode: var tmp = newWideCString(cmdl) var ee = - if e.str.isNil: nil + if e.str.isNil: newWideCString(nil) else: newWideCString(e.str, e.len) var wwd = newWideCString(wd) var flags = NORMAL_PRIORITY_CLASS or CREATE_UNICODE_ENVIRONMENT