diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-27 19:26:22 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-27 23:17:06 +0300 |
commit | 22e6ae11b46cb73640c3f48f7e5353d57d3e040b (patch) | |
tree | d7ae1fc5c1dc906483d275366cfb1d16ace8ffaf /source/blender/blenkernel/intern/deform.c | |
parent | b4087ea6392e051fd9e4f7ee5207d089a044e15e (diff) |
VGroup search: do not try to search for empty string.
Vgroups always have a non-empty name, this is just loss of time...
Diffstat (limited to 'source/blender/blenkernel/intern/deform.c')
-rw-r--r-- | source/blender/blenkernel/intern/deform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index bbb7fc4b3bd..e61b8f71ffa 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -479,12 +479,12 @@ void defvert_flip_merged(MDeformVert *dvert, const int *flip_map, const int flip bDeformGroup *defgroup_find_name(Object *ob, const char *name) { - return BLI_findstring(&ob->defbase, name, offsetof(bDeformGroup, name)); + return (name && name[0] != '\0') ? BLI_findstring(&ob->defbase, name, offsetof(bDeformGroup, name)) : NULL; } int defgroup_name_index(Object *ob, const char *name) { - return (name) ? BLI_findstringindex(&ob->defbase, name, offsetof(bDeformGroup, name)) : -1; + return (name && name[0] != '\0') ? BLI_findstringindex(&ob->defbase, name, offsetof(bDeformGroup, name)) : -1; } /** |