diff options
author | Hans Goudey <h.goudey@me.com> | 2021-11-09 22:15:34 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-11-09 22:15:34 +0300 |
commit | 7b530c6096112c9a15db2e637d44012e248f1ab4 (patch) | |
tree | a8522e1a69f1a97a5b0288345ec4ae808bc7c44d /source/blender/editors/interface/view2d.c | |
parent | 44239fa106335d2f620978a33a9e9b1ad2905caf (diff) |
Fix: Incorrect assert in dot grid drawing
It's totally valid for the grid levels to be zero.
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r-- | source/blender/editors/interface/view2d.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index eea6512f0f8..9a6fbbf4016 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -1348,7 +1348,7 @@ void UI_view2d_dot_grid_draw(const View2D *v2d, const float min_step, const int grid_levels) { - BLI_assert(grid_levels > 0 && grid_levels < 10); + BLI_assert(grid_levels >= 0 && grid_levels < 10); const float zoom_x = (float)(BLI_rcti_size_x(&v2d->mask) + 1) / BLI_rctf_size_x(&v2d->cur); const float zoom_normalized = (zoom_x - v2d->minzoom) / (v2d->maxzoom - v2d->minzoom); |