From f849384fcd6ec2174a2639b945fc537596eaeeb9 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 22 May 2006 01:59:28 +0000 Subject: [PATCH] === Python API === Fixes for the bug introduced by my other commit the other day. Blender.Draw.Create now does proper error checking. --- source/blender/python/api2_2x/Draw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c index d6b0f179cca..661d1b805f9 100644 --- a/source/blender/python/api2_2x/Draw.c +++ b/source/blender/python/api2_2x/Draw.c @@ -785,6 +785,10 @@ static PyObject *Method_Create( PyObject * self, PyObject * args ) but = NULL; PyErr_SetString( PyExc_TypeError, "expected string, float, int or 3-float tuple argument" ); } + + if (but != NULL) { + PyErr_Clear(); + } return (PyObject*) but; }