Fix T55223: Crash when changing lattice resolution.

This commit is contained in:
Germano Cavalcante 2018-05-29 15:39:44 -03:00
parent f8908f0d43
commit 00dc1c08aa
Notes: blender-bot 2023-02-14 06:00:49 +01:00
Referenced by issue #55223, Lattice options crash
1 changed files with 4 additions and 2 deletions

View File

@ -211,8 +211,10 @@ void BKE_lattice_resize(Lattice *lt, int uNew, int vNew, int wNew, Object *ltOb)
/* works best if we force to linear type (endpoints match) */
lt->typeu = lt->typev = lt->typew = KEY_LINEAR;
/* prevent using deformed locations */
BKE_displist_free(&ltOb->curve_cache->disp);
if (ltOb->curve_cache) {
/* prevent using deformed locations */
BKE_displist_free(&ltOb->curve_cache->disp)
}
copy_m4_m4(mat, ltOb->obmat);
unit_m4(ltOb->obmat);