Fix T56455: [2.8] Crash when projecting skinwrap curve/path.

Shrinkwrap is not only a Mesh modifier...
This commit is contained in:
Bastien Montagne
2018-08-23 21:49:14 +02:00
parent a6b65c75cd
commit 4cde92303f

View File

@@ -108,11 +108,11 @@ static void deformVerts(
struct Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph);
Mesh *mesh_src = mesh;
if (mesh_src == NULL) {
if (mesh_src == NULL && ctx->object->type == OB_MESH) {
mesh_src = ctx->object->data;
}
BLI_assert(mesh_src->totvert == numVerts);
BLI_assert(mesh_src == NULL || mesh_src->totvert == numVerts);
shrinkwrapModifier_deform((ShrinkwrapModifierData *)md, scene, ctx->object, mesh_src, vertexCos, numVerts);
}