From 0a4ff4f53485c09b08606179c635d59abe75750a Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 5 Aug 2013 10:56:28 +0200 Subject: commit: fix segfault apk would try run the trigger even if package failed to install. --- src/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commit.c b/src/commit.c index 576224a..8766cc8 100644 --- a/src/commit.c +++ b/src/commit.c @@ -206,7 +206,7 @@ static void run_triggers(struct apk_database *db, struct apk_changeset *changese if (pkg == NULL) continue; ipkg = pkg->ipkg; - if (ipkg->pending_triggers->num == 0) + if (ipkg == NULL || ipkg->pending_triggers->num == 0) continue; *apk_string_array_add(&ipkg->pending_triggers) = NULL; -- cgit v1.2.3-70-g09d2