Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/Expressions')
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp
index e6b49332273..107b12b7159 100644
--- a/source/gameengine/Expressions/PyObjectPlus.cpp
+++ b/source/gameengine/Expressions/PyObjectPlus.cpp
@@ -519,6 +519,10 @@ int PyObjectPlus::py_set_attrdef(void *self, const PyAttributeDef *attrdef, PyOb
{
if ((*attrdef->m_checkFunction)(self, attrdef) != 0)
{
+ // if the checing function didnt set an error then set a generic one here so we dont set an error with no exception
+ if (PyErr_Occurred()==0)
+ PyErr_Format(PyExc_AttributeError, "type check error for attribute \"%s\", reasion unknown", attrdef->m_name);
+
// post check returned an error, restore values
UNDO_AND_ERROR:
if (undoBuffer)