mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
14 lines
682 B
Diff
14 lines
682 B
Diff
diff --git a/src/gallium/drivers/swr/rasterizer/core/utils.h b/src/gallium/drivers/swr/rasterizer/core/utils.h
|
|
index b096d2120cb..3c849e82d3b 100644
|
|
--- a/src/gallium/drivers/swr/rasterizer/core/utils.h
|
|
+++ b/src/gallium/drivers/swr/rasterizer/core/utils.h
|
|
@@ -365,7 +365,8 @@ static INLINE std::string GetEnv(const std::string& variableName)
|
|
output.resize(valueSize - 1); // valueSize includes null, output.resize() does not
|
|
GetEnvironmentVariableA(variableName.c_str(), &output[0], valueSize);
|
|
#else
|
|
- output = getenv(variableName.c_str());
|
|
+ char *o = getenv(variableName.c_str());
|
|
+ output = o ? std::string(o) : std::string();
|
|
#endif
|
|
|
|
return output;
|