summaryrefslogtreecommitdiff
path: root/python/progress.cc
diff options
context:
space:
mode:
Diffstat (limited to 'python/progress.cc')
-rw-r--r--python/progress.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/progress.cc b/python/progress.cc
index a7fd7ae1..9e870875 100644
--- a/python/progress.cc
+++ b/python/progress.cc
@@ -28,6 +28,8 @@ inline bool setattr(PyObject *object, const char *attr, const char *fmt, T arg)
if (!object)
return false;
PyObject *value = Py_BuildValue(fmt, arg);
+ if (value == NULL)
+ return false;
int result = PyObject_SetAttrString(object, attr, value);
Py_DECREF(value);