From 2ae7593700a2442cba40e0085301e68a075e0cab Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 28 Nov 2015 21:05:12 +0500 Subject: [PATCH] Cycles: Avoid having two consequence getenv() calls --- intern/cycles/device/device_cuda.cpp | 5 +++-- 1 file 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