Checked all cases where PyArg_ParseTuple is used in blenders game engine and made sure all will raise errors when called with invalid args.

This commit is contained in:
2008-07-01 16:43:46 +00:00
parent bc8364fef0
commit b0958b6646
11 changed files with 187 additions and 13 deletions

View File

@@ -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;
}