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
path: root/source
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2004-05-05 07:22:22 +0400
committerDaniel Dunbar <daniel@zuster.org>2004-05-05 07:22:22 +0400
commitf54160ca2fd72ac8902b5e05a6848222813da6ab (patch)
tree2273444f4b54db472aa5aa2a55f84e3300adb81e /source
parentbaa54a9a9f89d87fc97c962966a7eebea21a05ed (diff)
- PyInt_AsLong() was called on a possibly NULL object, this may be
a checked error but is no good anyway - Bone_dealloc free'd Blender's actual copy of the Bone! AGH!!!! - On syntax errors the python global dictionary was being free'd twice. AGH!!! again! Can someone from the Python team please audit this.
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/BPY_interface.c9
-rw-r--r--source/blender/python/api2_2x/Bone.c1
2 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c
index 8d7d8bd91fb..b549b817587 100644
--- a/source/blender/python/BPY_interface.c
+++ b/source/blender/python/BPY_interface.c
@@ -339,8 +339,12 @@ void BPY_Err_Handle(char *script_name)
PyErr_Restore(exception, err, tb); /* takes away reference! */
PyErr_Print();
v = PyObject_GetAttrString(err, "lineno");
- g_script_error.lineno = PyInt_AsLong(v);
- Py_XDECREF(v);
+ if (v) {
+ g_script_error.lineno = PyInt_AsLong(v);
+ Py_DECREF(v);
+ } else {
+ g_script_error.lineno = -1;
+ }
/* this avoids an abort in Python 2.3's garbage collecting: */
PyErr_Clear();
return;
@@ -445,6 +449,7 @@ int BPY_txt_do_python_Text(struct Text* text)
BPY_Err_Handle(GetName(text));
ReleaseGlobalDictionary(py_dict);
+ script->py_globaldict = NULL;
free_libblock(&G.main->script, script);
//BPY_end_python();
//BPY_start_python();
diff --git a/source/blender/python/api2_2x/Bone.c b/source/blender/python/api2_2x/Bone.c
index 539d2213547..99246707561 100644
--- a/source/blender/python/api2_2x/Bone.c
+++ b/source/blender/python/api2_2x/Bone.c
@@ -1067,7 +1067,6 @@ Bone_setPose (BPy_Bone *self, PyObject *args)
static void
Bone_dealloc (BPy_Bone * self)
{
- MEM_freeN(self->bone);
PyObject_DEL (self);
}