From 498e518b22f9976c4ebcf110c05ada4c0d9bedf6 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 21 Jun 2009 11:17:08 +0200 Subject: python/progress.cc: Fix segfault related to pulse_items. --- python/progress.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'python/progress.cc') 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("()"); -- cgit v1.2.3