From f005bb1a2adc5ff8329c369c3b72fd22ae304e80 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 22 Oct 2008 16:13:30 +0000 Subject: Missing NULL check causes crash on Ikey when no active object. Error is bad enough to go for a retag... hrmf! Report from Ernesto (der|kunstler) Mndez in irc. Thanks a lot! --- source/blender/src/keyframing.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/src/keyframing.c b/source/blender/src/keyframing.c index 244c67264c3..2590bacd4b6 100644 --- a/source/blender/src/keyframing.c +++ b/source/blender/src/keyframing.c @@ -921,6 +921,9 @@ static short incl_v3d_ob_shapekey (bKeyingSet *ks, const char mode[]) Object *ob= (G.obedit)? (G.obedit) : (OBACT); char *newname= NULL; + if(ob==NULL) + return 0; + /* not available for delete mode */ if (strcmp(mode, "Delete")==0) return 0; @@ -1183,6 +1186,8 @@ static short incl_buts_ob (bKeyingSet *ks, const char mode[]) { Object *ob= OBACT; /* only if object is mesh type */ + + if(ob==NULL) return 0; return (ob->type == OB_MESH); } -- cgit v1.2.3