diff options
-rw-r--r-- | lib/libalpm/be_local.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index 9dce66df..7d5d0c2d 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -367,6 +367,9 @@ int _alpm_local_db_populate(pmdb_t *db) ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1)); dbpath = _alpm_db_path(db); + if(dbpath == NULL) { + return(-1); + } dbdir = opendir(dbpath); if(dbdir == NULL) { return(0); |