[Bf-blender-cvs] [e437bab5d83] cycles_texture_cache: Cycles: Added NULL pointer check

Stefan Werner noreply at git.blender.org
Tue Jun 19 13:35:38 CEST 2018


Commit: e437bab5d8337d36b4f4eb50700bbca538e8920c
Author: Stefan Werner
Date:   Tue Mar 6 14:49:56 2018 +0100
Branches: cycles_texture_cache
https://developer.blender.org/rBe437bab5d8337d36b4f4eb50700bbca538e8920c

Cycles: Added NULL pointer check

===================================================================

M	intern/cycles/device/device_cpu.cpp

===================================================================

diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index 5bd62e0572c..a7145246380 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -274,10 +274,12 @@ public:
 	~CPUDevice()
 	{
 		task_pool.stop();
-		texture_info.free();		
-		VLOG(1) << oiio_globals.tex_sys->getstats();
-		oiio_globals.tex_sys->reset_stats();
-		TextureSystem::destroy(oiio_globals.tex_sys);
+		texture_info.free();
+		if(oiio_globals.tex_sys) {
+			VLOG(1) << oiio_globals.tex_sys->getstats();
+			oiio_globals.tex_sys->reset_stats();
+			TextureSystem::destroy(oiio_globals.tex_sys);
+		}
 		kernel_globals.oiio = NULL;
 	}



More information about the Bf-blender-cvs mailing list