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>2009-04-05 18:01:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-05 18:01:49 +0400
commit033a63f8580227582a9695ebdd78ac0b4322e867 (patch)
tree61517f343a2908f894d54c46269baa5c54338135 /source/gameengine/Ketsji/KX_SceneActuator.cpp
parent7d4dc4f0f5d34d91703b2219323ef4a3db28a572 (diff)
BGE Bugfixes (mostly in the py api)
KX_PolygonMaterial and KX_BlenderMaterial - Added a print function (would raise a python error on printing) * Crashes * KX_GameObject SetParent - Disallowed setting a parent to its self, caused a recursion crash. KX_MeshProxy "materials" attribute was segfaulting because of my recent change - I was wrong, you do need to check material types (no idea why since they are both PyObject * at the base) KX_VisibilityActuator - Wasn't initialized with PyType_Ready() making it crash on access (own fault) * Crashes because of missing NULL checks * KX_PolygonMaterial's "gl_texture" attribute wasnt checking for a valid m_tface KX_GameObject - added checks for GetPhysicsController() KX_RayCast::RayTest - didnt check for a valid physics_environment KX_SceneActuator's getCamera python function wasnt checking if there was a camera.
Diffstat (limited to 'source/gameengine/Ketsji/KX_SceneActuator.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_SceneActuator.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_SceneActuator.cpp b/source/gameengine/Ketsji/KX_SceneActuator.cpp
index 40a2ff2ef66..f158eb29dd7 100644
--- a/source/gameengine/Ketsji/KX_SceneActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SceneActuator.cpp
@@ -468,6 +468,11 @@ PyObject* KX_SceneActuator::PyGetCamera(PyObject* self,
PyObject* kwds)
{
ShowDeprecationWarning("getCamera()", "the camera property");
- return PyString_FromString(m_camera->GetName());
+ if (m_camera) {
+ PyString_FromString(m_camera->GetName());
+ }
+ else {
+ Py_RETURN_NONE;
+ }
}
/* eof */