From 770e816ceef226484e7e96009c97082a95509a59 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 5 Jan 2007 00:23:55 +0000 Subject: [PATCH] Bugfix #5600: When clicking on the basis curve of a Curve's shapekeys in the IPO Editor with 'Relative' turned off, Blender crashed. This was caused by the call to set_sculpt_object() which only works on meshes (at the moment). I've added a check to make sure this is only called for meshes. Also, silenced the 'implicit declaration' warning my compiler was giving me about this function. --- source/blender/src/editipo.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c index 5e475a1bf83..95b8feb357b 100644 --- a/source/blender/src/editipo.c +++ b/source/blender/src/editipo.c @@ -203,6 +203,8 @@ EditIpo *get_active_editipo(void) static void set_active_key(int index) { + extern void set_sculpt_object(Object *ob); + if(G.sipo->blocktype==ID_KE && G.sipo->from) { Object *ob= (Object *)G.sipo->from; Key *key= ob_get_key(ob); @@ -215,7 +217,10 @@ static void set_active_key(int index) ob->shapenr= index; ob->shapeflag |= OB_SHAPE_TEMPLOCK; - set_sculpt_object(ob); + /* only meshes have sculptmode */ + if (ob->type==OB_MESH) { + set_sculpt_object(ob); + } /* calc keypos */ DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);