[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44551] trunk/blender/source/blender/ python/bmesh/bmesh_py_types.c: Fix 30401: Python API vert new((0, 0, 0)) crashes.

Howard Trickey howard.trickey at gmail.com
Wed Feb 29 15:16:40 CET 2012


Revision: 44551
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44551
Author:   howardt
Date:     2012-02-29 14:16:35 +0000 (Wed, 29 Feb 2012)
Log Message:
-----------
Fix 30401: Python API vert new((0,0,0)) crashes.

Thanks to Campbell for fix, adding an & to an arg.
Also needed to negate the sense of a later test.

Modified Paths:
--------------
    trunk/blender/source/blender/python/bmesh/bmesh_py_types.c

Modified: trunk/blender/source/blender/python/bmesh/bmesh_py_types.c
===================================================================
--- trunk/blender/source/blender/python/bmesh/bmesh_py_types.c	2012-02-29 14:10:12 UTC (rev 44550)
+++ trunk/blender/source/blender/python/bmesh/bmesh_py_types.c	2012-02-29 14:16:35 UTC (rev 44551)
@@ -1213,7 +1213,7 @@
 	BPY_BM_CHECK_OBJ(self);
 
 	if (!PyArg_ParseTuple(args, "|OO!:verts.new",
-	                      py_co,
+	                      &py_co,
 	                      &BPy_BMVert_Type, &py_vert_example))
 	{
 		return NULL;
@@ -1227,7 +1227,7 @@
 			BPY_BM_CHECK_OBJ(py_vert_example);
 		}
 
-		if (py_co && mathutils_array_parse(co, 3, 3, py_co, "verts.new(co)") != -1) {
+		if (!py_co || mathutils_array_parse(co, 3, 3, py_co, "verts.new(co)") == -1) {
 			return NULL;
 		}
 




More information about the Bf-blender-cvs mailing list