Fix #111811: Corrective smooth modifier crash with zero vertices
In the charge splash screen demo file for Blender 3.4, the corrective smooth modifier is called with a zero vertex mesh, which means it ends up trying to free a null pointer is creates locally. Checking for null resolves the crash. A future fix will remove the assumption that `rest_coords` are allocated with the guarded allocator and can be used as an argument to `MEM_dupallocN`.
This commit is contained in:
@@ -554,8 +554,8 @@ static void calc_deltas(CorrectiveSmoothModifierData *csmd,
|
||||
mul_v3_m3v3(csmd->delta_cache.deltas[l_index], imat, delta);
|
||||
}
|
||||
|
||||
MEM_freeN(tangent_spaces);
|
||||
MEM_freeN(smooth_vertex_coords);
|
||||
MEM_SAFE_FREE(tangent_spaces);
|
||||
MEM_SAFE_FREE(smooth_vertex_coords);
|
||||
}
|
||||
|
||||
static void correctivesmooth_modifier_do(ModifierData *md,
|
||||
|
||||
Reference in New Issue
Block a user