]> git.ipfire.org Git - pakfire.git/commitdiff
repo: Do not call pakfire_repo_identical() without a repository
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 7 Feb 2021 17:02:37 +0000 (17:02 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 7 Feb 2021 17:02:37 +0000 (17:02 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/repo.c

index 10f2aac8c2f1fdd280f746b10ada658fdb7fe710..f99a8567a324aa3360484616882e7d03d86058b1 100644 (file)
@@ -364,6 +364,8 @@ PAKFIRE_EXPORT char* pakfire_repo_get_config(PakfireRepo repo) {
 
 PAKFIRE_EXPORT int pakfire_repo_is_installed_repo(PakfireRepo repo) {
        PakfireRepo installed_repo = pakfire_get_installed_repo(repo->pakfire);
+       if (!installed_repo)
+               return 1;
 
        int r = pakfire_repo_identical(repo, installed_repo);