From 6ba34d18b55bedbddb750e5231a2aec9a1fbbac0 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Sat, 14 Mar 2009 13:27:41 +0000 Subject: Fixed incorrect argument checking. --- .../UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature') diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp index a6a6d69de30..0044f4b0864 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp @@ -104,12 +104,12 @@ int CurveNatureF1D___init__( BPy_CurveNatureF1D* self, PyObject *args) { PyObject *obj = 0; - if( !PyArg_ParseTuple(args, "|O", &obj) ) { + if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { cout << "ERROR: CurveNatureF1D___init__" << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_edgenature.uf1D_edgenature = new Functions1D::CurveNatureF1D(t); return 0; -- cgit v1.2.3