diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-03-04 07:46:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-03-04 07:46:07 +0300 |
commit | 24f0807550aca84fa4f3a7948a11a41c33554536 (patch) | |
tree | b1b7ddfb8d1e857af66800261ab62e1dbc8a232f /source/blender/python/intern/bpy_app_openvdb.c | |
parent | a40ccde405211b82eed8259b1afaa43dc41fa6a6 (diff) |
Cleanup: replace Py_CLEAR with Py_DECREF in bpy.app modules
In this case, there is no benefit to using Py_CLEAR
as the value will never be NULL and can't be used later on.
Diffstat (limited to 'source/blender/python/intern/bpy_app_openvdb.c')
-rw-r--r-- | source/blender/python/intern/bpy_app_openvdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_app_openvdb.c b/source/blender/python/intern/bpy_app_openvdb.c index c98c6ec0137..20a61ba170a 100644 --- a/source/blender/python/intern/bpy_app_openvdb.c +++ b/source/blender/python/intern/bpy_app_openvdb.c @@ -81,8 +81,8 @@ static PyObject *make_openvdb_info(void) SetStrItem("Unknown"); #endif - if (PyErr_Occurred()) { - Py_CLEAR(openvdb_info); + if (UNLIKELY(PyErr_Occurred())) { + Py_DECREF(openvdb_info); return NULL; } |