Commit: 2ae7593700a2442cba40e0085301e68a075e0cab
Author: Sergey Sharybin
Date:   Sat Nov 28 21:05:12 2015 +0500
Branches: master
https://developer.blender.org/rB2ae7593700a2442cba40e0085301e68a075e0cab

Cycles: Avoid having two consequence getenv() calls

===================================================================

M       intern/cycles/device/device_cuda.cpp

===================================================================

diff --git a/intern/cycles/device/device_cuda.cpp 
b/intern/cycles/device/device_cuda.cpp
index eea82b1..65d5e09 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -304,8 +304,9 @@ public:
                }
 #endif
 
-               if(getenv("CYCLES_CUDA_EXTRA_CFLAGS")) {
-                       command += string(" ") + 
getenv("CYCLES_CUDA_EXTRA_CFLAGS");
+               const char* extra_cflags = getenv("CYCLES_CUDA_EXTRA_CFLAGS");
+               if(extra_cflags) {
+                       command += string(" ") + string(extra_cflags);
                }
 
 #ifdef WITH_CYCLES_DEBUG

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to