forked from bartvdbraak/blender
BGE PyController module reloading didnt check that the base of the function was a module (could be a class).
This commit is contained in:
parent
cfa2b4f0a5
commit
3820e4f3db
@ -336,7 +336,7 @@ bool SCA_PythonController::Import()
|
|||||||
PyObject *base= mod;
|
PyObject *base= mod;
|
||||||
|
|
||||||
for(unsigned int i=1; i < py_function_path.size(); i++) {
|
for(unsigned int i=1; i < py_function_path.size(); i++) {
|
||||||
if(m_debug) {
|
if(m_debug && PyModule_Check(base)) { /* base could be a class */
|
||||||
Py_DECREF(base); /* getting a new one so dont hold a ref to the old one */
|
Py_DECREF(base); /* getting a new one so dont hold a ref to the old one */
|
||||||
base= PyImport_ReloadModule(base);
|
base= PyImport_ReloadModule(base);
|
||||||
if (base==NULL) {
|
if (base==NULL) {
|
||||||
|
@ -1452,7 +1452,7 @@ void KX_Scene::LogicEndFrame()
|
|||||||
{
|
{
|
||||||
m_logicmgr->EndFrame();
|
m_logicmgr->EndFrame();
|
||||||
int numobj = m_euthanasyobjects->GetCount();
|
int numobj = m_euthanasyobjects->GetCount();
|
||||||
int i;
|
|
||||||
KX_GameObject* obj;
|
KX_GameObject* obj;
|
||||||
|
|
||||||
while ((numobj = m_euthanasyobjects->GetCount()) > 0)
|
while ((numobj = m_euthanasyobjects->GetCount()) > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user