From 0ea46ec202cd789d386eefa3e12018cb2bde56b0 Mon Sep 17 00:00:00 2001 From: Ken Hughes Date: Sun, 16 Oct 2005 16:39:11 +0000 Subject: [PATCH] - Bugfix #3194: calling curve.appendNurb() with any number of float param other than 4 or 5 caused segfault (thanks for catching, Cam) --- source/blender/python/api2_2x/CurNurb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/python/api2_2x/CurNurb.c b/source/blender/python/api2_2x/CurNurb.c index 9704c343b27..0b5f09c0efc 100644 --- a/source/blender/python/api2_2x/CurNurb.c +++ b/source/blender/python/api2_2x/CurNurb.c @@ -561,15 +561,15 @@ PyObject *CurNurb_appendPointToNurb( Nurb * nurb, PyObject * args ) makeknots( nurb, 1, nurb->flagu >> 1 ); - } else if( size == 3 ) { /* 3 xyz coords */ - printf( "\nNot Yet Implemented!\n" ); - + } else { + return EXPP_ReturnPyObjError( PyExc_TypeError, + "expected a sequence of 4 or 5 floats" ); } } else { /* bail with error */ return EXPP_ReturnPyObjError( PyExc_TypeError, - "expected a sequence of 4 (or optionaly 5) floats\n" ); + "expected a sequence of 4 or 5 floats" ); }