diff options
Diffstat (limited to 'source/blender/python/intern/bpy_rna_gizmo.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna_gizmo.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/python/intern/bpy_rna_gizmo.c b/source/blender/python/intern/bpy_rna_gizmo.c index 869019692df..f121bfd6e36 100644 --- a/source/blender/python/intern/bpy_rna_gizmo.c +++ b/source/blender/python/intern/bpy_rna_gizmo.c @@ -80,10 +80,10 @@ static void py_rna_gizmo_handler_get_cb(const wmGizmo *UNUSED(gz), } else { if (PyC_AsArray(value, + sizeof(*value), ret, gz_prop->type->array_length, &PyFloat_Type, - false, "Gizmo get callback: ") == -1) { goto fail; } @@ -103,6 +103,8 @@ fail: PyErr_Print(); PyErr_Clear(); + Py_DECREF(ret); + PyGILState_Release(gilstate); } @@ -139,6 +141,7 @@ static void py_rna_gizmo_handler_set_cb(const wmGizmo *UNUSED(gz), if (ret == NULL) { goto fail; } + Py_DECREF(args); Py_DECREF(ret); PyGILState_Release(gilstate); @@ -199,11 +202,11 @@ static void py_rna_gizmo_handler_range_get_cb(const wmGizmo *UNUSED(gz), return; fail: - Py_XDECREF(ret); - PyErr_Print(); PyErr_Clear(); + Py_XDECREF(ret); + PyGILState_Release(gilstate); } @@ -426,11 +429,11 @@ static PyObject *bpy_gizmo_target_set_value(PyObject *UNUSED(self), PyObject *ar if (array_len != 0) { float *value = BLI_array_alloca(value, array_len); if (PyC_AsArray(value, + sizeof(*value), params.value, gz_prop->type->array_length, &PyFloat_Type, - false, - "Gizmo target property array") == -1) { + "Gizmo target property array: ") == -1) { goto fail; } WM_gizmo_target_property_float_set_array(BPY_context_get(), gz, gz_prop, value); |