Commit 0a4ff4f5 authored by Natanael Copa's avatar Natanael Copa

commit: fix segfault

apk would try run the trigger even if package failed to install.
parent 065427f4
......@@ -206,7 +206,7 @@ static void run_triggers(struct apk_database *db, struct apk_changeset *changese
if (pkg == NULL)
ipkg = pkg->ipkg;
if (ipkg->pending_triggers->num == 0)
if (ipkg == NULL || ipkg->pending_triggers->num == 0)
*apk_string_array_add(&ipkg->pending_triggers) = NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment