From 0059e5118d3bafe097cdbcabcdedbb736abb63f2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 28 May 2007 21:53:49 +0000 Subject: [PATCH] passing None to Blender.Mathutils.Quaternion would segfault --- source/blender/python/api2_2x/Mathutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/python/api2_2x/Mathutils.c b/source/blender/python/api2_2x/Mathutils.c index a21c8bb27eb..35db6bfcadf 100644 --- a/source/blender/python/api2_2x/Mathutils.c +++ b/source/blender/python/api2_2x/Mathutils.c @@ -1065,7 +1065,7 @@ PyObject *M_Mathutils_Quaternion(PyObject * self, PyObject * args) } }else{ listObject = PySequence_GetItem(args, 1); - if (PySequence_Check(listObject)) { + if (size>1 && PySequence_Check(listObject)) { size = PySequence_Length(listObject); if (size != 3) { // invalid args/size