mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-08 15:04:21 +00:00
Don't crash on linux if getenv() returns NULL for unknown variable
This commit is contained in:
1 file changed
+5
-1
@@ -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