r53351 removed a NULL check for name in defgroup_name_index(). name can be NULL when deforming verts in the BGE, so I'm adding a NULL check back in.
This commit is contained in:
@@ -343,7 +343,7 @@ bDeformGroup *defgroup_find_name(Object *ob, const char *name)
|
||||
|
||||
int defgroup_name_index(Object *ob, const char *name)
|
||||
{
|
||||
return BLI_findstringindex(&ob->defbase, name, offsetof(bDeformGroup, name));
|
||||
return (name) ? BLI_findstringindex(&ob->defbase, name, offsetof(bDeformGroup, name)) : -1;
|
||||
}
|
||||
|
||||
/* note, must be freed */
|
||||
|
Reference in New Issue
Block a user