diff --git a/lib/plist.c b/lib/plist.c index 14ce9dd2..25214bca 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -131,9 +131,11 @@ xbps_array_foreach_cb(struct xbps_handle *xhp, unsigned int arraycount, slicecount, pkgcount; int rv = 0, maxthreads, i; - assert(xbps_object_type(array) == XBPS_TYPE_ARRAY); assert(fn != NULL); + if (xbps_object_type(array) != XBPS_TYPE_ARRAY) + return 0; + arraycount = xbps_array_count(array); if (arraycount == 0) return 0;