From 45441c07d4609493aecf265b64ad0c108722e9db Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 18 Apr 2010 09:12:18 +0000 Subject: 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. --- source/gameengine/Ketsji/KX_Light.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/gameengine/Ketsji/KX_Light.cpp') 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; } -- cgit v1.2.3