diff options
author | Ton Roosendaal <ton@blender.org> | 2008-10-22 20:13:30 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-10-22 20:13:30 +0400 |
commit | f005bb1a2adc5ff8329c369c3b72fd22ae304e80 (patch) | |
tree | b43be1f5daa25ce9701c18eebaf0e5473498f13e /source | |
parent | fbecf0cadcd9a73c13dfaad6e23f60d2bbf1dc76 (diff) |
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!
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/keyframing.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); } |