summaryrefslogtreecommitdiff
path: root/src/VBox/Runtime/generic/env-generic.cpp
diff options
context:
space:
mode:
authorFelix Geyer <fgeyer@debian.org>2014-04-05 22:17:15 +0200
committerFelix Geyer <fgeyer@debian.org>2014-04-05 22:17:15 +0200
commit1700c7d32f7d9d101cbba9f1fcb8bb57ed16a727 (patch)
tree727251ad65172262944f82bb0f28601c3fb6f6b3 /src/VBox/Runtime/generic/env-generic.cpp
parent1e85aed889b772c2f2daa7a6d9e8bd967aa213d8 (diff)
downloadvirtualbox-upstream.tar.gz
Imported Upstream version 4.3.10-dfsgupstream/4.3.10-dfsgupstream
Diffstat (limited to 'src/VBox/Runtime/generic/env-generic.cpp')
-rw-r--r--src/VBox/Runtime/generic/env-generic.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/VBox/Runtime/generic/env-generic.cpp b/src/VBox/Runtime/generic/env-generic.cpp
index 9afb4d84b..0d9a13b95 100644
--- a/src/VBox/Runtime/generic/env-generic.cpp
+++ b/src/VBox/Runtime/generic/env-generic.cpp
@@ -234,6 +234,11 @@ RTDECL(int) RTEnvClone(PRTENV pEnv, RTENV EnvToClone)
#ifdef RTENV_HAVE_WENVIRON
papszEnv = NULL;
papwszEnv = (PCRTUTF16 * const )_wenviron;
+ if (!papwszEnv)
+ {
+ _wgetenv(L"Path"); /* Force the CRT to initalize it. */
+ papwszEnv = (PCRTUTF16 * const)_wenviron;
+ }
if (papwszEnv)
while (papwszEnv[cVars])
cVars++;