[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17297] trunk/blender/source/blender/ python/api2_2x/Armature.c: Bugfix #17942

Ton Roosendaal ton at blender.org
Sun Nov 2 19:05:12 CET 2008


Revision: 17297
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17297
Author:   ton
Date:     2008-11-02 19:05:11 +0100 (Sun, 02 Nov 2008)

Log Message:
-----------
Bugfix #17942

Python dict error: when trying to access a Bone via a key, and the key
was not found, a wrong error message got printed. Fix provided by
reporter Gregor Riepl. Thanks!

Modified Paths:
--------------
    trunk/blender/source/blender/python/api2_2x/Armature.c

Modified: trunk/blender/source/blender/python/api2_2x/Armature.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Armature.c	2008-11-02 18:02:31 UTC (rev 17296)
+++ trunk/blender/source/blender/python/api2_2x/Armature.c	2008-11-02 18:05:11 UTC (rev 17297)
@@ -244,7 +244,8 @@
 	}
 	if(value == NULL){  /* item not found in dict. throw exception */
 		char* key_str = PyString_AsString( key );
-		if (key_str) {
+		
+		if (key_str==NULL) {
 			return EXPP_ReturnPyObjError(PyExc_KeyError, "bone key must be a string" );
 		} else {
 			char buffer[128];





More information about the Bf-blender-cvs mailing list