From 03302fd5edb154623f073e15a46e24f94445a3f4 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 6 Jan 2016 23:06:54 +0500 Subject: [PATCH] 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. --- intern/cycles/kernel/osl/osl_services.cpp | 12 ++++++++---- 1 file 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,