commit: fix segfault

apk would try run the trigger even if package failed to install.
cute-signatures
Natanael Copa 2013-08-05 10:56:28 +02:00
parent 065427f417
commit 0a4ff4f534
1 changed files with 1 additions and 1 deletions

View File

@ -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;