Fix serious bug in 'curve-to-mesh' conversion code.
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 15 Jun 2017 10:34:12 +0000 (12:34 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 15 Jun 2017 10:34:12 +0000 (12:34 +0200)
Eeeeeek!^2 Calling unconditionnaly ID freeing `BKE_libblock_free()` on a
datablock (ob->data, i.e. Curve) that may be used elsewhere...
Veryveryvery bad!

source/blender/blenkernel/intern/mesh.c

index 67b1e0b5a7d6ddfb7956190313a31eecb1ceef7c..89e988782d26da66427d28ed48b5943970e85932 100644 (file)
@@ -1399,7 +1399,7 @@ void BKE_mesh_from_nurbs_displist(Object *ob, ListBase *dispbase, const bool use
        cu->totcol = 0;
 
        if (ob->data) {
-               BKE_libblock_free(bmain, ob->data);
+               BKE_libblock_free_us(bmain, ob->data);
        }
        ob->data = me;
        ob->type = OB_MESH;