Fix #22654: Converted curve from mesh disappearing

Curve object should have ob->bb=NULL if there is no derivedMesh
This commit is contained in:
2010-06-23 09:58:02 +00:00
parent ee14cc198b
commit d200243a5c
2 changed files with 12 additions and 0 deletions

View File

@@ -1855,6 +1855,12 @@ void makeDispListCurveTypes(Scene *scene, Object *ob, int forOrco)
DM_set_object_boundbox (ob, ob->derivedFinal);
} else {
boundbox_displist (ob);
/* if there is no derivedMesh, object's boundbox is unneeded */
if (ob->bb) {
MEM_freeN(ob->bb);
ob->bb= NULL;
}
}
}

View File

@@ -1186,6 +1186,12 @@ void mesh_to_curve(Scene *scene, Object *ob)
if (needsFree) {
ob->derivedFinal = NULL;
/* curve object could have got bounding box only in special cases */
if(ob->bb) {
MEM_freeN(ob->bb);
ob->bb= NULL;
}
}
}