summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-21 13:50:31 +0100
committerDan McGee <dan@archlinux.org>2011-03-21 13:50:31 +0100
commit488f341f57a1533397e33de9c749dbe778a1cbd4 (patch)
treed4b00658c4d59ee07024fcd19f3b4681b839a57b /lib/libalpm
parent0303b26b1ed6d060e65ec7dbae5db50fc14836ff (diff)
downloadpacman-488f341f57a1533397e33de9c749dbe778a1cbd4.tar.gz
pacman-488f341f57a1533397e33de9c749dbe778a1cbd4.tar.xz
Ensure dlcb is defined before calling it
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/dload.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index ebfd0425..121ba86d 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -100,7 +100,9 @@ static int curl_progress(void *filename, double dltotal, double dlnow,
return 1;
}
- handle->dlcb((const char*)filename, (long)dlnow, (long)dltotal);
+ if(handle->dlcb) {
+ handle->dlcb((const char*)filename, (long)dlnow, (long)dltotal);
+ }
prevprogress = dlnow;