diff options
author | Ton Roosendaal <ton@blender.org> | 2008-11-02 21:05:11 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-11-02 21:05:11 +0300 |
commit | a775719e23aecfd09accff61d16ba59514538416 (patch) | |
tree | b57fb37472e4110c28e43f402451c3df3c869a2b | |
parent | 2973bd8ea27c83274669051297ee470723dfcf9d (diff) |
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!
-rw-r--r-- | source/blender/python/api2_2x/Armature.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Armature.c b/source/blender/python/api2_2x/Armature.c index aa3ef82a3e8..99a4398ec89 100644 --- a/source/blender/python/api2_2x/Armature.c +++ b/source/blender/python/api2_2x/Armature.c @@ -244,7 +244,8 @@ static PyObject *BonesDict_GetItem(BPy_BonesDict *self, PyObject* key) } 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]; |