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
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-01-06 21:06:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-01-06 21:06:54 +0300
commit03302fd5edb154623f073e15a46e24f94445a3f4 (patch)
treef397d8f8e080f5c0a8e1f9d15a4ba24159ccbe01 /intern
parent944b6322e6e8fbd6b496702851cd2dedfdaec91b (diff)
Fix T47120: CPU OSL Cycles crashes blender in latest GIT
The issue was caused by leaking error messages caused by getting OIIO texture handle for built-in images.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/osl/osl_services.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp
index 9ac8a3eec82..23c441e28ef 100644
--- a/intern/cycles/kernel/osl/osl_services.cpp
+++ b/intern/cycles/kernel/osl/osl_services.cpp
@@ -858,8 +858,10 @@ bool OSLRenderServices::texture(ustring filename,
OSLThreadData *tdata = kg->osl_tdata;
OIIO::TextureSystem::Perthread *texture_thread_info =
tdata->oiio_thread_info;
- OIIO::TextureSystem::TextureHandle *texture_handle =
- ts->get_texture_handle(filename, texture_thread_info);
+ OIIO::TextureSystem::TextureHandle *texture_handle = NULL;
+ if(filename[0] != '@') {
+ texture_handle = ts->get_texture_handle(filename, texture_thread_info);
+ }
return texture(filename,
texture_handle,
texture_thread_info,
@@ -887,8 +889,10 @@ bool OSLRenderServices::texture3d(ustring filename,
OSLThreadData *tdata = kg->osl_tdata;
OIIO::TextureSystem::Perthread *texture_thread_info =
tdata->oiio_thread_info;
- OIIO::TextureSystem::TextureHandle *texture_handle =
- ts->get_texture_handle(filename, texture_thread_info);
+ OIIO::TextureSystem::TextureHandle *texture_handle = NULL;
+ if(filename[0] != '@') {
+ texture_handle = ts->get_texture_handle(filename, texture_thread_info);
+ }
return texture3d(filename,
texture_handle,
texture_thread_info,