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_PythonInit.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_PythonInit.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 0831788009d..47f5577552f 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -425,7 +425,7 @@ static PyObject* gPyEnableVisibility(PyObject*,
}
else
{
- Py_Return;
+ return NULL;
}
Py_Return;
}
@@ -449,6 +449,9 @@ static PyObject* gPyShowMouse(PyObject*,
gp_Canvas->SetMouseState(RAS_ICanvas::MOUSE_INVISIBLE);
}
}
+ else {
+ return NULL;
+ }
Py_Return;
}
@@ -465,6 +468,9 @@ static PyObject* gPySetMousePosition(PyObject*,
if (gp_Canvas)
gp_Canvas->SetMousePosition(x,y);
}
+ else {
+ return NULL;
+ }
Py_Return;
}
@@ -568,6 +574,9 @@ static PyObject* gPySetMistStart(PyObject*,
gp_Rasterizer->SetFogStart(miststart);
}
}
+ else {
+ return NULL;
+ }
Py_Return;
}
@@ -586,6 +595,9 @@ static PyObject* gPySetMistEnd(PyObject*,
gp_Rasterizer->SetFogEnd(mistend);
}
}
+ else {
+ return NULL;
+ }
Py_Return;
}
@@ -623,6 +635,9 @@ static PyObject* gPyMakeScreenshot(PyObject*,
gp_Canvas->MakeScreenShot(filename);
}
}
+ else {
+ return NULL;
+ }
Py_Return;
}
@@ -638,6 +653,9 @@ static PyObject* gPyEnableMotionBlur(PyObject*,
gp_Rasterizer->EnableMotionBlur(motionblurvalue);
}
}
+ else {
+ return NULL;
+ }
Py_Return;
}