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!
This commit is contained in:
parent
fbecf0cadc
commit
f005bb1a2a
@ -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[])
|
|||||||
{
|
{
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user