diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-04-18 13:12:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-04-18 13:12:18 +0400 |
commit | 45441c07d4609493aecf265b64ad0c108722e9db (patch) | |
tree | 47ccd4e9dff0d6521181a3997c7fdc49a651eda3 /source/gameengine/Ketsji | |
parent | 01e2de7c538d4b0bbddefae7f5272af93a30319b (diff) |
various minor fixes
- collada export would run MEM_freeN on an un-initialized pointer in some cases.
- makesrna was missing a call to close a file.
- text cursor update function was missing a NULL check for st->text.
- possible (unlikely) un-initialized return value for bge python lamp.type, set error instead.
- possible (unlikely) missing NULL terminator with strncpy for ffmpeg.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_Light.cpp | 5 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_WorldIpoController.cpp | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index db708d25d40..109f248b15e 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -352,6 +352,11 @@ PyObject* KX_LightObject::pyattr_get_typeconst(void *self_v, const KX_PYATTRIBUT } else if (!strcmp(type, "NORMAL")) { retvalue = PyLong_FromSsize_t(RAS_LightObject::LIGHT_NORMAL); } + else { + /* should never happen */ + PyErr_SetString(PyExc_TypeError, "light.type: internal error, invalid light type"); + retvalue = NULL; + } return retvalue; } diff --git a/source/gameengine/Ketsji/KX_WorldIpoController.cpp b/source/gameengine/Ketsji/KX_WorldIpoController.cpp index f40c4b0253a..3404461d9e9 100644 --- a/source/gameengine/Ketsji/KX_WorldIpoController.cpp +++ b/source/gameengine/Ketsji/KX_WorldIpoController.cpp @@ -48,7 +48,8 @@ bool KX_WorldIpoController::Update(double currentTime) for (i = m_interpolators.begin(); !(i == m_interpolators.end()); ++i) { (*i)->Execute(m_ipotime);//currentTime); } - + + /* TODO, this will crash! */ KX_WorldInfo *world = NULL; if (m_modify_mist_start) { |