Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix crash when installing empty packages
Baptiste Daroussin committed 5 years ago
commit ab5d57033edbfe2f4211dad8187a18a258a1d884
parent 90d639b254680a61966303b9e874ad764325de4d
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)