diff --git a/lib/log.c b/lib/log.c index 7cee498f..efdabc44 100644 --- a/lib/log.c +++ b/lib/log.c @@ -56,7 +56,8 @@ xbps_dbg_printf_append(struct xbps_handle *xhp, const char *fmt, ...) { va_list ap; - assert(xhp); + if (!xhp) + return; if ((xhp->flags & XBPS_FLAG_DEBUG) == 0) return; @@ -71,7 +72,8 @@ xbps_dbg_printf(struct xbps_handle *xhp, const char *fmt, ...) { va_list ap; - assert(xhp); + if (!xhp) + return; if ((xhp->flags & XBPS_FLAG_DEBUG) == 0) return;