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

@@ -5704,6 +5704,10 @@ static PyObject *Mesh_getFromObject( BPy_Mesh * self, PyObject * args )
nurbs_to_mesh( tmpobj );
tmpmesh = tmpobj->data;
free_libblock_us( &G.main->object, tmpobj );
if (ob->type != OB_MESH)
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
"cant convert curve to mesh. Does the curve have any segments?" );
break;
case OB_MBALL:
/* metaballs don't have modifiers, so just convert to mesh */