Cycles: don't crash if OSLRenderServices::osl_ts is unset
authorMai Lavelle <mai.lavelle@gmail.com>
Wed, 17 Aug 2016 12:42:10 +0000 (08:42 -0400)
committerMai Lavelle <mai.lavelle@gmail.com>
Wed, 31 Aug 2016 00:50:22 +0000 (20:50 -0400)
intern/cycles/kernel/osl/osl_services.cpp

index 153ebad6cd2f3957d280938cc0f671b721e6e90d..422af32ee7908b06a568c3de9a83e420628523ae 100644 (file)
@@ -127,8 +127,10 @@ OSLRenderServices::OSLRenderServices()
 
 OSLRenderServices::~OSLRenderServices()
 {
-       VLOG(2) << "OSL texture system stats:\n"
-               << osl_ts->getstats();
+       if(osl_ts) {
+               VLOG(2) << "OSL texture system stats:\n"
+                       << osl_ts->getstats();
+       }
 #ifdef WITH_PTEX
        ptex_cache->release();
 #endif