diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-20 22:34:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-20 22:34:58 +0400 |
commit | 2e20d3dc9610b702788092e9d72689b971ed9f69 (patch) | |
tree | 2cb33b641a209d37f83dc515cf7184f380827eb1 /source | |
parent | 3dcd5a196db4cf67cd2b8322d6d0311371db28f2 (diff) |
fix for error using uninitialized variable with shape key conversion.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh_conv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c index a7ecc897ff0..e247a69f1e9 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_conv.c +++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c @@ -824,7 +824,10 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess) /* in most cases this runs */ copy_v3_v3(fp, CustomData_bmesh_get_n(&bm->vdata, eve->head.data, CD_SHAPEKEY, j)); } - else if (oldkey) { + else if (oldkey && + (keyi = CustomData_bmesh_get(&bm->vdata, eve->head.data, CD_SHAPE_KEYINDEX)) && + (*keyi != ORIGINDEX_NONE && *keyi < currkey->totelem)) + { /* old method of reconstructing keys via vertice's original key indices, * currently used if the new method above fails (which is theoretically * possible in certain cases of undo) */ |