1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

only call HOOK_DESTROY callback if hook supports it

This commit is contained in:
Steffen Vogel 2016-11-20 03:46:53 -05:00
parent 8240bf52c9
commit 671e964d43

View file

@ -36,7 +36,9 @@ int hook_init(struct hook *h, struct list *nodes, struct list *paths, struct set
void hook_destroy(struct hook *h)
{
struct hook_info i = { NULL };
h->cb(h, HOOK_DESTROY, &i);
if (h->type & HOOK_DESTROY)
h->cb(h, HOOK_DESTROY, &i);
}
int hook_copy(struct hook *h, struct hook *c)