[Bf-blender-cvs] [1a7dda046b5] blender-v2.79-release: PyAPI: Fix mathutils freeze allowing owned data
Campbell Barton
noreply at git.blender.org
Sun Sep 10 21:52:28 CEST 2017
Commit: 1a7dda046b533a758e83391333d628cb10948cba
Author: Campbell Barton
Date: Sat Sep 9 11:08:38 2017 +1000
Branches: blender-v2.79-release
https://developer.blender.org/rB1a7dda046b533a758e83391333d628cb10948cba
PyAPI: Fix mathutils freeze allowing owned data
===================================================================
M source/blender/python/mathutils/mathutils.c
===================================================================
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 1afb1d7be90..96ae0a9e50f 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -554,8 +554,8 @@ char BaseMathObject_freeze_doc[] =
;
PyObject *BaseMathObject_freeze(BaseMathObject *self)
{
- if (self->flag & BASE_MATH_FLAG_IS_WRAP) {
- PyErr_SetString(PyExc_TypeError, "Cannot freeze wrapped data");
+ if ((self->flag & BASE_MATH_FLAG_IS_WRAP) || (self->cb_user != NULL)) {
+ PyErr_SetString(PyExc_TypeError, "Cannot freeze wrapped/owned data");
return NULL;
}
More information about the Bf-blender-cvs
mailing list