fix for a crash in Blender.Mesh,

getting curve data from an object failed (with only 1 curve vertex)
Blender.Mesh didnt check this and crashed.
This commit is contained in:
2007-05-28 16:49:48 +00:00
parent 3030e93a5b
commit a8bc1f3397
3 changed files with 12 additions and 3 deletions

View File

@@ -2527,8 +2527,11 @@ static void curvetomesh(Object *ob)
if(dl==0) makeDispListCurveTypes(ob, 0); /* force creation */
nurbs_to_mesh(ob); /* also does users */
object_free_modifiers(ob);
if (ob->type != OB_MESH) {
error("can't convert curve to mesh");
} else {
object_free_modifiers(ob);
}
}
void convertmenu(void)