Fix crash when you change the curve resolution in Edit Mode of the Blender Render engine

Same problem as previous commit, but now in `drawobject.c`.
Also added a comment to the equivalent line in `draw_cache_imp_curve.c`.
This commit is contained in:
Germano Cavalcante 2018-01-02 23:31:28 -02:00
parent 6c46dff50d
commit 2a57a46441
2 changed files with 2 additions and 1 deletions

View File

@ -126,6 +126,7 @@ static int curve_render_normal_len_get(const ListBase *lb, const CurveCache *ob_
nr -= skip;
}
#else
/* Same as loop above */
normal_len += (nr / (skip + 1)) + ((nr % (skip + 1)) != 0);
#endif
}

View File

@ -7405,7 +7405,7 @@ static void draw_editnurb(
}
#else
/* Same as loop above */
count += 4 * max_ii((nr + max_ii(skip - 1, 0)) / (skip + 1), 0);
count += (nr / (skip + 1)) + ((nr % (skip + 1)) != 0);
#endif
}