Fix: Mesh to Volume modifier crashes when object is in edit mode

Bug and fix has been found by dfelinto, thanks.
This commit is contained in:
Jacques Lucke 2020-10-01 15:53:50 +02:00
parent 5e6459ac1c
commit d7af1c7bd9
1 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@
#include "BKE_lib_query.h"
#include "BKE_mesh_runtime.h"
#include "BKE_mesh_wrapper.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_volume.h"
@ -213,6 +214,7 @@ static Volume *modifyVolume(ModifierData *md, const ModifierEvalContext *ctx, Vo
if (mesh == NULL) {
return input_volume;
}
BKE_mesh_wrapper_ensure_mdata(mesh);
const float4x4 mesh_to_own_object_space_transform = float4x4(ctx->object->imat) *
float4x4(object_to_convert->obmat);