diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-05 15:59:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-05 15:59:15 +0400 |
commit | 1f53674bb8d34c3fff836e064679d5e845eaff4b (patch) | |
tree | d8d8f5521837958b012e765fd3d07e271b43c319 | |
parent | 48013e8a9c82f4178ab054fa35bdbd9248417409 (diff) |
avoid divide by zero with grid fill (when there is no selection)
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 91003a1964a..831906e958d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index fa65fb88315..9e5782c12f2 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -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); |