From 488f341f57a1533397e33de9c749dbe778a1cbd4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 21 Mar 2011 07:50:31 -0500 Subject: Ensure dlcb is defined before calling it Signed-off-by: Dan McGee --- lib/libalpm/dload.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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; -- cgit v1.2.3-24-g4f1b