From 24f0807550aca84fa4f3a7948a11a41c33554536 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Mar 2021 15:46:07 +1100 Subject: 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. --- source/blender/python/intern/bpy_app_sdl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/python/intern/bpy_app_sdl.c') 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; } -- cgit v1.2.3