same as 2.44 stable - missing NULL checks.

This commit is contained in:
2007-06-29 13:46:15 +00:00
parent e192e7e024
commit d31999767b
2 changed files with 10 additions and 5 deletions

View File

@@ -2542,6 +2542,9 @@ static PyObject *MEdge_getLength( BPy_MEdge * self )
static PyObject *MEdge_getKey( BPy_MEdge * self )
{
MEdge *edge = MEdge_get_pointer( self );
if (!edge)
return NULL; /* error is set */
PyObject *attr = PyTuple_New( 2 );
if (edge->v1 > edge->v2) {
PyTuple_SET_ITEM( attr, 0, PyInt_FromLong(edge->v2) );