PyAPI: Fix mathutils freeze allowing owned data

This commit is contained in:
Campbell Barton 2017-09-09 11:08:38 +10:00 committed by Bastien Montagne
parent 82466852fe
commit 1a7dda046b
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}