diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-10-10 16:38:22 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-10-10 16:38:22 +0200 |
| commit | 83d517779b4fe415005cea53a1d2d037013d8caa (patch) | |
| tree | 3ae511afd6c9171bd1e555ccd5e49be46bd8085c /python | |
| parent | 1f299c6eef3e5b6e2cd74c27dfd33de41e08f734 (diff) | |
| download | python-apt-83d517779b4fe415005cea53a1d2d037013d8caa.tar.gz | |
python/progress.cc: check result of Py_BuildValue() too
Diffstat (limited to 'python')
| -rw-r--r-- | python/progress.cc | 2 |
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); |
