[Bf-blender-cvs] [d6b28bb] master: Cycles: Fix crashes when loading cache created with pre-leaf split builds

Sergey Sharybin noreply at git.blender.org
Wed Apr 29 12:50:09 CEST 2015


Commit: d6b28bbb1d61f059ec28156fb275393ee3389d57
Author: Sergey Sharybin
Date:   Wed Apr 29 15:48:49 2015 +0500
Branches: master
https://developer.blender.org/rBd6b28bbb1d61f059ec28156fb275393ee3389d57

Cycles: Fix crashes when loading cache created with pre-leaf split builds

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

M	intern/cycles/util/util_cache.h

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

diff --git a/intern/cycles/util/util_cache.h b/intern/cycles/util/util_cache.h
index 9d001a6..343fa36 100644
--- a/intern/cycles/util/util_cache.h
+++ b/intern/cycles/util/util_cache.h
@@ -105,7 +105,7 @@ public:
 			return false;
 		}
 
-		if(!size)
+		if((size == 0) || (size % sizeof(T)) != 0)
 			return false;
 
 		data.resize(size/sizeof(T));




More information about the Bf-blender-cvs mailing list