mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-22 21:55:52 +00:00
Don't crash on linux if getenv() returns NULL for unknown variable
This commit is contained in:
@@ -43,5 +43,9 @@ std::string GetCWD()
|
||||
|
||||
std::string GetEnvVar(const char *var)
|
||||
{
|
||||
return getenv(var);
|
||||
const char *data = getenv(var);
|
||||
if(data)
|
||||
return data;
|
||||
|
||||
return "";
|
||||
}
|
||||
Reference in New Issue
Block a user