diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-03-29 21:44:14 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-03-29 21:44:14 +0400 |
commit | 68e088f1cf3e3b8daa4a5d17acb6f0525ca6de95 (patch) | |
tree | a7b25263104f72f16d340119a09fcbcf29f8e695 /source/blender/freestyle/intern/python/BPy_Interface0D.cpp | |
parent | d79ddebaaec697e1775a6f652a1ee064eb053bf4 (diff) |
Improvements on error handling in the Python API.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Interface0D.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/BPy_Interface0D.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp index 78bd4176658..fb8c27c4205 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp @@ -249,10 +249,8 @@ PyObject *Interface0D_getPoint2D( BPy_Interface0D *self ) { PyObject *Interface0D_getFEdge( BPy_Interface0D *self, PyObject *args ) { PyObject *py_if0D; - if(!( PyArg_ParseTuple(args, "O", &py_if0D) && BPy_Interface0D_Check(py_if0D) )) { - cout << "ERROR: Interface0D_getFEdge" << endl; - Py_RETURN_NONE; - } + if(!( PyArg_ParseTuple(args, "O!", &Interface0D_Type, &py_if0D) )) + return NULL; FEdge *fe = self->if0D->getFEdge(*( ((BPy_Interface0D *) py_if0D)->if0D )); if( fe ) |