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:14:01 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2018-05-27 18:16:15 +0300
commitedce44d6931586fad3cee019db762d54e73a886a (patch)
tree181b0ef4048592930010a221f60d6af03d4281af /intern/cycles/render
parent56254a42e0aa42a39e1f3f7b3d13905168c3f39c (diff)
Cycles: Fix problems in the IES loader when rendering with no file selected
Diffstat (limited to 'intern/cycles/render')
-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 f0824ef4319..5a77094c0c1 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -891,8 +891,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));
}