Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2018-05-27 18:26:59 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2018-05-27 18:26:59 +0300
commit1863883a248faa1fcae4b99332c8d5e6d3957845 (patch)
treeadb53f3624e5e90b70e48e32c3b0a89c749fe94e /intern/cycles/render/light.cpp
parent47f2b3b80d748ccfe1192dbd7c3176be88814da1 (diff)
parentedce44d6931586fad3cee019db762d54e73a886a (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/render/light.cpp')
-rw-r--r--intern/cycles/render/light.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 91f9b4e3bec..806f1cad03e 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -898,8 +898,10 @@ void LightManager::tag_update(Scene * /*scene*/)
int LightManager::add_ies_from_file(ustring filename)
{
string content;
- /* If the file can't be opened, call with an empty string */
- path_read_text(filename.c_str(), content);
+ /* If the file can't be opened, call with an empty line */
+ if(filename.empty() || !path_read_text(filename.c_str(), content)) {
+ content == "\n";
+ }
return add_ies(ustring(content));
}