diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-06-21 11:17:08 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-06-21 11:17:08 +0200 |
| commit | 498e518b22f9976c4ebcf110c05ada4c0d9bedf6 (patch) | |
| tree | e45e8e6c2e63b33a8376cfa92d34b8bb05082a12 /python/progress.cc | |
| parent | 17d6eb223a252ecd6d4f4f0f3acee695404da1d0 (diff) | |
| download | python-apt-498e518b22f9976c4ebcf110c05ada4c0d9bedf6.tar.gz | |
python/progress.cc: Fix segfault related to pulse_items.
Diffstat (limited to 'python/progress.cc')
| -rw-r--r-- | python/progress.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python/progress.cc b/python/progress.cc index 2671f6fc..bc46b0c8 100644 --- a/python/progress.cc +++ b/python/progress.cc @@ -310,11 +310,11 @@ bool PyFetchProgress::Pulse(pkgAcquire * Owner) PyObject *result; bool res = true; - - RunSimpleCallback("pulse_items", arglist, &result); - if (result != NULL && PyArg_Parse(result, "b", &res) && res == false) { - // the user returned a explicit false here, stop - return false; + if (RunSimpleCallback("pulse_items", arglist, &result)) { + if (result != NULL && PyArg_Parse(result, "b", &res) && res == false) { + // the user returned a explicit false here, stop + return false; + } } arglist = Py_BuildValue("()"); |
