diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-06-29 17:46:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-06-29 17:46:15 +0400 |
commit | d31999767b635a7aeba2b0b152efa8155e3ec095 (patch) | |
tree | a978f8e1dc232896bf15b16534e5432a046e922f /source/blender/python/api2_2x/Mesh.c | |
parent | e192e7e02452c70511f688582d8d95d0a6267ee5 (diff) |
same as 2.44 stable - missing NULL checks.
Diffstat (limited to 'source/blender/python/api2_2x/Mesh.c')
-rw-r--r-- | source/blender/python/api2_2x/Mesh.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c index 164fdb4b372..3e5ffa22eaf 100644 --- a/source/blender/python/api2_2x/Mesh.c +++ b/source/blender/python/api2_2x/Mesh.c @@ -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) ); |