cache: if the cache_table is NULL don't search it

Dylan Baker 2022-08-02 11:51:37 -07:00
parent 9d82962160
commit 02710ffdef
1 changed files with 3 additions and 0 deletions

View File

@ -86,6 +86,9 @@ cache_dump(const pkgconf_client_t *client)
pkgconf_pkg_t * pkgconf_pkg_t *
pkgconf_cache_lookup(pkgconf_client_t *client, const char *id) pkgconf_cache_lookup(pkgconf_client_t *client, const char *id)
{ {
if (client->cache_table == NULL)
return NULL;
pkgconf_pkg_t **pkg; pkgconf_pkg_t **pkg;
pkg = bsearch(id, client->cache_table, pkg = bsearch(id, client->cache_table,