diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-09 04:08:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-09-09 04:08:38 +0300 |
commit | 3c3d0898b0c1a1d7da70f4a1778d4360b3cfe5c8 (patch) | |
tree | becf69140624f940f428aa382b7573ba0234a3fd /source/blender/python/mathutils/mathutils.c | |
parent | 30d8829780d9ab01340254c697985e9d00104347 (diff) |
PyAPI: Fix mathutils freeze allowing owned data
Diffstat (limited to 'source/blender/python/mathutils/mathutils.c')
-rw-r--r-- | source/blender/python/mathutils/mathutils.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |