Ensure dlcb is defined before calling it

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-03-21 07:50:31 -05:00
parent 0303b26b1e
commit 488f341f57
1 changed files with 3 additions and 1 deletions

View File

@ -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;