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));

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to