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/Ketsji/KX_PyMath.h')
-rw-r--r--source/gameengine/Ketsji/KX_PyMath.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h
index b0000405893..8924567acde 100644
--- a/source/gameengine/Ketsji/KX_PyMath.h
+++ b/source/gameengine/Ketsji/KX_PyMath.h
@@ -104,19 +104,20 @@ bool PyMatTo(PyObject* pymat, T& mat)
if (!PyErr_Occurred() && PySequence_Check(pyrow))
{
unsigned int cols = PySequence_Size(pyrow);
- if (cols != Size(mat))
+ if (cols != Size(mat)) {
noerror = false;
- else
- {
- for(unsigned int col = 0; col < cols; col++)
- {
+ }
+ else {
+ for (unsigned int col = 0; col < cols; col++) {
PyObject *item = PySequence_GetItem(pyrow, col); /* new ref */
mat[row][col] = PyFloat_AsDouble(item);
Py_DECREF(item);
}
}
- } else
+ }
+ else {
noerror = false;
+ }
Py_DECREF(pyrow);
}
} else