From f684dfc43216a3e9286202bd07b05064bb37f9ee Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Apr 2015 15:54:37 +1000 Subject: Fix T44364: Remove shape key crashes Blender --- source/blender/modifiers/intern/MOD_cloth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/modifiers/intern') diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index d76427cd6ee..392112e4b4a 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -98,7 +98,7 @@ static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData, if (derivedData == NULL && clmd->sim_parms->shapekey_rest) { KeyBlock *kb = BKE_keyblock_from_key(BKE_key_from_object(ob), clmd->sim_parms->shapekey_rest); - if (kb->data != NULL) { + if (kb && kb->data != NULL) { float (*layerorco)[3]; if (!(layerorco = DM_get_vert_data_layer(dm, CD_CLOTH_ORCO))) { DM_add_vert_layer(dm, CD_CLOTH_ORCO, CD_CALLOC, NULL); -- cgit v1.2.3