[Bf-blender-cvs] [4594cc25ac8] master: Fix T56720: Lattice: crash on setting points_u/v/w from python.
Bastien Montagne
noreply at git.blender.org
Sat Sep 8 15:31:28 CEST 2018
Commit: 4594cc25ac8f8c07e62eb32f745be01e9444c2b4
Author: Bastien Montagne
Date: Sat Sep 8 15:29:39 2018 +0200
Branches: master
https://developer.blender.org/rB4594cc25ac8f8c07e62eb32f745be01e9444c2b4
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...
===================================================================
M source/blender/blenkernel/intern/lattice.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list