diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-09-08 16:29:39 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-09-08 16:29:39 +0300 |
commit | 4594cc25ac8f8c07e62eb32f745be01e9444c2b4 (patch) | |
tree | 1c2bad0a6ebec7a28f8508f3eadcc3e39ddcee31 /source | |
parent | 59eaa9030098b7991c3a8bf01f56fe7f2cf0cd36 (diff) |
Fix T56720: Lattice: crash on setting points_u/v/w from python.
One need to check that there is something to free, before trying to free it...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/lattice.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 582743acff4..1e99712f47a 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -216,7 +216,9 @@ void BKE_lattice_resize(Lattice *lt, int uNew, int vNew, int wNew, Object *ltOb) lt->typeu = lt->typev = lt->typew = KEY_LINEAR; /* prevent using deformed locations */ - BKE_displist_free(<Ob->curve_cache->disp); + if (ltOb->curve_cache != NULL) { + BKE_displist_free(<Ob->curve_cache->disp); + } copy_m4_m4(mat, ltOb->obmat); unit_m4(ltOb->obmat); |