passing None to Blender.Mathutils.Quaternion would segfault

This commit is contained in:
Campbell Barton 2007-05-28 21:53:49 +00:00
parent 288631d215
commit 0059e5118d

@ -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