diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-29 02:11:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-29 02:11:19 +0400 |
commit | 5591d03f2189f416adb0f9b48dc71474884471c1 (patch) | |
tree | c1484dea8afd9266b0377fff425361e2a685210e | |
parent | b8bb3f2e3c52186b388dedba7cc0a950adf2d0a2 (diff) |
fix invalid *= on an un-initialized value when adding primitives.
-rw-r--r-- | source/blender/editors/mesh/editmesh_add.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index b4d4a76daed..c2a97b3ea70 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -101,7 +101,7 @@ static void make_prim_init(bContext *C, const char *idname, *state = 1; } - *dia *= new_primitive_matrix(C, loc, rot, mat); + *dia = new_primitive_matrix(C, loc, rot, mat); } static void make_prim_finish(bContext *C, int *state, int enter_editmode) @@ -127,7 +127,7 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op) Object *obedit; Mesh *me; BMEditMesh *em; - float loc[3], rot[3], mat[4][4], dia = 1.0f; + float loc[3], rot[3], mat[4][4], dia; int enter_editmode; int state; unsigned int layer; @@ -185,7 +185,7 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op) me = obedit->data; em = me->edit_btmesh; - if (!EDBM_op_call_and_selectf(em, op, "vertout", "create_cube mat=%m4 size=%f", mat, 2.0f)) { + if (!EDBM_op_call_and_selectf(em, op, "vertout", "create_cube mat=%m4 size=%f", mat, dia * 2.0f)) { return OPERATOR_CANCELLED; } @@ -412,7 +412,7 @@ static int add_primitive_grid_exec(bContext *C, wmOperator *op) Object *obedit; Mesh *me; BMEditMesh *em; - float loc[3], rot[3], mat[4][4], dia = 1.0f; + float loc[3], rot[3], mat[4][4], dia; int enter_editmode; int state; unsigned int layer; |