diff options
Diffstat (limited to 'intern/cycles/render/light.cpp')
-rw-r--r-- | intern/cycles/render/light.cpp | 6 |
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)); } |