Fix T54202: Cycles crash rendering empty mesh volume after recent optimization.
[blender-staging.git] / intern / cycles / render / mesh.cpp
index 23b855acdc951bac76bcf3714e1150e1e0900071..47d24970949eeef220f4df29d71565f62957239b 100644 (file)
@@ -561,8 +561,9 @@ void Mesh::clear(bool preserve_voxel_data)
        subd_attributes.clear();
        attributes.clear(preserve_voxel_data);
 
+       used_shaders.clear();
+
        if(!preserve_voxel_data) {
-               used_shaders.clear();
                geometry_flags = GEOMETRY_NONE;
        }