From efb7dd86ff001efe26fba1caef70a87806d138f6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Apr 2009 04:34:27 +0000 Subject: Fix for own recent reference count error. - The armature weakref list was being incref'd twice then decrefed twice (incref and decref were used incorrectly), now only once. My 'fix' broke this. - In bpy_pydriver_create_dict the 2 refs added from running PyDict_SetItemString twice were undone when clearing the dictionary (added comment) - changed Py_XDECREF to Py_DECREF int BPY_pyconstraint_update and BPY_pyconstraint_target, Py_XDECREF checs for NULL value which would have crashed blender before it got to Py_XDECREF anyway. - after every error is reported (PyErr_Print), remove sys.last_traceback and clear the error, I found this fixed certain crashes (usually when starting the game engine or exiting blender), so best do this all the time. - header_text.c, CcdPhysicsEnvironment.cpp, KX_CameraActuator.cpp - remove some warnings. --- source/gameengine/Ketsji/KX_PolygonMaterial.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/gameengine/Ketsji/KX_PolygonMaterial.cpp') diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp index 56a1daa7544..056442f77d9 100644 --- a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp +++ b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp @@ -109,6 +109,8 @@ bool KX_PolygonMaterial::Activate(RAS_IRasterizer* rasty, TCachingInfo& cachingI else { PyErr_Print(); + PyErr_Clear(); + PySys_SetObject( (char *)"last_traceback", NULL); } } else -- cgit v1.2.3