Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix crash when installing empty packages
Baptiste Daroussin committed 5 years ago
commit ab5d57033edbfe2f4211dad8187a18a258a1d884
parent 90d639b
1 file changed +8 -6
modified libpkg/triggers.c
@@ -467,12 +467,14 @@ triggers_execute(struct trigger *cleanup_triggers)
			goto cleanup;
	}

-
	kh_foreach_value(ctx.touched_dir_hash, dir, {
-
		LL_FOREACH(triggers, t) {
-
			trigger_check_match(t, dir);
-
		}
-
		/* We need to check if that matches a trigger */
-
	});
+
	if (ctx.touched_dir_hash) {
+
		kh_foreach_value(ctx.touched_dir_hash, dir, {
+
				LL_FOREACH(triggers, t) {
+
				trigger_check_match(t, dir);
+
				}
+
				/* We need to check if that matches a trigger */
+
				});
+
	}

	LL_FOREACH(triggers, t) {
		if (t->matched == NULL)