Fix bevel crash in OSX debug build.
authorHoward Trickey <howard.trickey@gmail.com>
Fri, 23 Nov 2012 03:15:16 +0000 (03:15 +0000)
committerHoward Trickey <howard.trickey@gmail.com>
Fri, 23 Nov 2012 03:15:16 +0000 (03:15 +0000)
Code to select from output slot moved before
EDBM_op_finish, which frees slot buffers.

source/blender/editors/mesh/editmesh_tools.c

index 1d546a5b7ce414c89d83bb6b32912a643a1b2a41..8fce8672b5c64c7df3a02542984e99b4e48a6a4b 100644 (file)
@@ -4766,10 +4766,6 @@ static int edbm_bevel_calc(bContext *C, wmOperator *op)
 
        BMO_op_exec(em->bm, &bmop);
 
-       /* no need to de-select existing geometry */
-       if (!EDBM_op_finish(em, &bmop, op, TRUE))
-               return 0;
-
        if (offset != 0.0f) {
                /* not essential, but we may have some loose geometry that
                 * won't get bevel'd and better not leave it selected */
@@ -4777,6 +4773,9 @@ static int edbm_bevel_calc(bContext *C, wmOperator *op)
                BMO_slot_buffer_hflag_enable(em->bm, bmop.slots_out, "faces.out", BM_FACE, BM_ELEM_SELECT, TRUE);
        }
 
+       /* no need to de-select existing geometry */
+       if (!EDBM_op_finish(em, &bmop, op, TRUE))
+               return 0;
 #else
        int i;