[Bf-blender-cvs] [899caea] master: Freestyle: Fix for a potential implementation error in the Python wrapper of the Nature class.

Tamito Kajiyama noreply at git.blender.org
Thu Mar 13 13:02:02 CET 2014


Commit: 899caeae498434462d0cb4775c10944929d325c4
Author: Tamito Kajiyama
Date:   Thu Mar 13 21:00:59 2014 +0900
https://developer.blender.org/rB899caeae498434462d0cb4775c10944929d325c4

Freestyle: Fix for a potential implementation error in the Python wrapper of the Nature class.

===================================================================

M	source/blender/freestyle/intern/python/BPy_Nature.cpp

===================================================================

diff --git a/source/blender/freestyle/intern/python/BPy_Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp
index bf27bc1..deedbb9 100644
--- a/source/blender/freestyle/intern/python/BPy_Nature.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp
@@ -288,8 +288,8 @@ static PyObject *BPy_Nature_bitwise(PyObject *a, int op, PyObject *b)
 			v = op1 | op2;
 			break;
 		default:
-			BLI_assert(0);
-			v = 0;
+			PyErr_BadArgument();
+			return NULL;
 	}
 	if (v == 0)
 		result = PyObject_NewVar(BPy_Nature, &Nature_Type, 0);




More information about the Bf-blender-cvs mailing list