_alpm_db_get_pkgcache_hash: check for error when loading pkgcache

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2014-12-22 00:33:41 +10:00
parent cd5e4b89f4
commit 87e55a4ee7
1 changed files with 4 additions and 1 deletions

View File

@ -542,7 +542,10 @@ alpm_pkghash_t *_alpm_db_get_pkgcache_hash(alpm_db_t *db)
}
if(!(db->status & DB_STATUS_PKGCACHE)) {
load_pkgcache(db);
if(load_pkgcache(db)) {
/* handle->error set in local/sync-db-populate */
return NULL;
}
}
return db->pkgcache;