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:
authorCampbell Barton <ideasman42@gmail.com>2008-07-01 20:43:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-07-01 20:43:46 +0400
commitb0958b6646b3b1fa8127f7620ce00e63ff82d0e7 (patch)
tree3b1dd8abd897d69c0baa2b7ebd4f0ba1a17573d6 /source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
parentbc8364fef030d95f27cff5ae6e068cc78bd1abd5 (diff)
Checked all cases where PyArg_ParseTuple is used in blenders game engine and made sure all will raise errors when called with invalid args.
Diffstat (limited to 'source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
index 27cfaefc076..2df4c6a9980 100644
--- a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
+++ b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
@@ -58,6 +58,9 @@ PyObject* KX_PhysicsObjectWrapper::PySetPosition(PyObject* self,
{
m_ctrl->setPosition(x,y,z);
}
+ else {
+ return NULL;
+ }
Py_INCREF(Py_None); return Py_None;
}
@@ -72,6 +75,9 @@ PyObject* KX_PhysicsObjectWrapper::PySetLinearVelocity(PyObject* self,
{
m_ctrl->SetLinearVelocity(x,y,z,local != 0);
}
+ else {
+ return NULL;
+ }
Py_INCREF(Py_None); return Py_None;
}
@@ -85,6 +91,9 @@ PyObject* KX_PhysicsObjectWrapper::PySetAngularVelocity(PyObject* self,
{
m_ctrl->SetAngularVelocity(x,y,z,local != 0);
}
+ else {
+ return NULL;
+ }
Py_INCREF(Py_None); return Py_None;
}
@@ -97,6 +106,9 @@ PyObject* KX_PhysicsObjectWrapper::PySetActive(PyObject* self,
{
m_ctrl->SetActive(active!=0);
}
+ else {
+ return NULL;
+ }
Py_INCREF(Py_None); return Py_None;
}