mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
dtoolutil: fix ExecutionEnvironment::has_environment_variable() for shadowed var
Fixes MAIN_DIR being set more than once (which seems to avoid a compiler bug in an opt4 build).
This commit is contained in:
parent
8f9ca34eec
commit
30bca7a119
@ -217,9 +217,11 @@ get_cwd() {
|
|||||||
*/
|
*/
|
||||||
bool ExecutionEnvironment::
|
bool ExecutionEnvironment::
|
||||||
ns_has_environment_variable(const string &var) const {
|
ns_has_environment_variable(const string &var) const {
|
||||||
#ifdef PREREAD_ENVIRONMENT
|
if (_variables.count(var) != 0) {
|
||||||
return _variables.count(var) != 0;
|
return true;
|
||||||
#else
|
}
|
||||||
|
|
||||||
|
#ifndef PREREAD_ENVIRONMENT
|
||||||
return getenv(var.c_str()) != nullptr;
|
return getenv(var.c_str()) != nullptr;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user