Fix T47302: Crash when OSL active with a viewport on rendered

Only happened when rendering second time with OSL enabled.
Was caused by fix for T47201. Hopefully now all the issues
are solved (meaning, we don't keep files opened and don't
crash either).
This commit is contained in:
Sergey Sharybin 2016-02-03 12:10:00 +01:00
parent 2a65acc952
commit d6531a5662

@ -186,7 +186,8 @@ void OSLShaderManager::texture_system_free()
ts_shared_users--; ts_shared_users--;
if(ts_shared_users == 0) { if(ts_shared_users == 0) {
OSL::TextureSystem::destroy(ts_shared, true); ts_shared->invalidate_all(true);
OSL::TextureSystem::destroy(ts_shared);
ts_shared = NULL; ts_shared = NULL;
} }