Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-03-04 07:46:07 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-04 07:46:07 +0300
commit24f0807550aca84fa4f3a7948a11a41c33554536 (patch)
treeb1b7ddfb8d1e857af66800261ab62e1dbc8a232f /source/blender/python/intern/bpy_app_sdl.c
parenta40ccde405211b82eed8259b1afaa43dc41fa6a6 (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_sdl.c')
-rw-r--r--source/blender/python/intern/bpy_app_sdl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_app_sdl.c b/source/blender/python/intern/bpy_app_sdl.c
index 645119c1c5d..e45e73fb4de 100644
--- a/source/blender/python/intern/bpy_app_sdl.c
+++ b/source/blender/python/intern/bpy_app_sdl.c
@@ -114,8 +114,8 @@ static PyObject *make_sdl_info(void)
SetObjItem(PyBool_FromLong(0));
#endif
- if (PyErr_Occurred()) {
- Py_CLEAR(sdl_info);
+ if (UNLIKELY(PyErr_Occurred())) {
+ Py_DECREF(sdl_info);
return NULL;
}