avoid divide by zero with grid fill (when there is no selection)

This commit is contained in:
Campbell Barton 2013-10-05 11:59:15 +00:00
parent 48013e8a9c
commit 1f53674bb8
2 changed files with 2 additions and 1 deletions

View File

@ -2285,6 +2285,7 @@ if(FIRST_RUN)
info_cfg_option(WITH_X11_XF86VMODE)
info_cfg_option(WITH_X11_XINPUT)
info_cfg_option(WITH_MEM_JEMALLOC)
info_cfg_option(WITH_MEM_VALGRIND)
info_cfg_option(WITH_SYSTEM_GLEW)
info_cfg_option(WITH_SYSTEM_OPENJPEG)

View File

@ -3002,7 +3002,7 @@ static int edbm_fill_grid_exec(bContext *C, wmOperator *op)
}
offset = RNA_property_int_get(op->ptr, prop_offset);
offset = mod_i(offset, clamp);
offset = clamp ? mod_i(offset, clamp) : 0;
/* in simple cases, move selection for tags, but also support more advanced cases */
edbm_fill_grid_prepare(em->bm, offset, &span, calc_span);