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

This commit is contained in:
Sergey Sharybin 2015-04-29 15:48:49 +05:00
parent 2e91bcfb9d
commit d6b28bbb1d

@ -105,7 +105,7 @@ public:
return false;
}
if(!size)
if((size == 0) || (size % sizeof(T)) != 0)
return false;
data.resize(size/sizeof(T));