Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/log.c')
-rw-r--r--lib/libalpm/log.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c
index 91bcb823..8bb88117 100644
--- a/lib/libalpm/log.c
+++ b/lib/libalpm/log.c
@@ -86,14 +86,13 @@ int SYMEXPORT alpm_logaction(pmhandle_t *handle, const char *fmt, ...)
void _alpm_log(pmhandle_t *handle, pmloglevel_t flag, const char *fmt, ...)
{
va_list args;
- alpm_cb_log logcb = alpm_option_get_logcb(handle);
- if(logcb == NULL) {
+ if(handle == NULL || handle->logcb == NULL) {
return;
}
va_start(args, fmt);
- logcb(flag, fmt, args);
+ handle->logcb(flag, fmt, args);
va_end(args);
}