Skip to content
Snippets Groups Projects
Commit f005bb1a authored by Ton Roosendaal's avatar Ton Roosendaal
Browse files

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!
parent fbecf0ca
Branches
Tags
No related merge requests found
...@@ -921,6 +921,9 @@ static short incl_v3d_ob_shapekey (bKeyingSet *ks, const char mode[]) ...@@ -921,6 +921,9 @@ static short incl_v3d_ob_shapekey (bKeyingSet *ks, const char mode[])
Object *ob= (G.obedit)? (G.obedit) : (OBACT); Object *ob= (G.obedit)? (G.obedit) : (OBACT);
char *newname= NULL; char *newname= NULL;
if(ob==NULL)
return 0;
/* not available for delete mode */ /* not available for delete mode */
if (strcmp(mode, "Delete")==0) if (strcmp(mode, "Delete")==0)
return 0; return 0;
...@@ -1183,6 +1186,8 @@ static short incl_buts_ob (bKeyingSet *ks, const char mode[]) ...@@ -1183,6 +1186,8 @@ static short incl_buts_ob (bKeyingSet *ks, const char mode[])
{ {
Object *ob= OBACT; Object *ob= OBACT;
/* only if object is mesh type */ /* only if object is mesh type */
if(ob==NULL) return 0;
return (ob->type == OB_MESH); return (ob->type == OB_MESH);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment