diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-11-28 19:05:12 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-11-28 19:05:12 +0300 |
commit | 2ae7593700a2442cba40e0085301e68a075e0cab (patch) | |
tree | fdc9f7fc39f23ed40bbe10d30fc8f0e48ca438ab /intern/cycles/device/device_cuda.cpp | |
parent | 6147c4037d288c7032c8dd63d6c448a9cebcc117 (diff) |
Cycles: Avoid having two consequence getenv() calls
Diffstat (limited to 'intern/cycles/device/device_cuda.cpp')
-rw-r--r-- | intern/cycles/device/device_cuda.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp index eea82b1f102..65d5e096c42 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 |