Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2013-01-03 02:14:40 +0400
committerMitchell Stokes <mogurijin@gmail.com>2013-01-03 02:14:40 +0400
commita4a3ed00186e0e73e20d1c85e90ea639e36653d1 (patch)
tree761ef051377279d261dd2a353c60b08980cce78c /source/blender/blenkernel/intern/deform.c
parentab9915ba8d2f0c594853dd96bc01170776a774fa (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/intern/deform.c')
-rw-r--r--source/blender/blenkernel/intern/deform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c
index b5280fdc039..cea92d53916 100644
--- a/source/blender/blenkernel/intern/deform.c
+++ b/source/blender/blenkernel/intern/deform.c
@@ -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 */