From 87bbf574bde2149daed9f9967f33ceae13250b70 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Thu, 6 Jun 2019 14:14:09 +0100 Subject: Only call events on modules which aren't dying. --- include/modules.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/modules.h') diff --git a/include/modules.h b/include/modules.h index 86d9d067d..45d2dd492 100644 --- a/include/modules.h +++ b/include/modules.h @@ -121,7 +121,8 @@ struct ModResult { _next = _i+1; \ try \ { \ - (*_i)->y x ; \ + if (!(*_i)->dying) \ + (*_i)->y x ; \ } \ catch (CoreException& modexcept) \ { \ @@ -144,7 +145,8 @@ do { \ _next = _i+1; \ try \ { \ - v = (*_i)->n args; + if (!(*_i)->dying) \ + v = (*_i)->n args; #define WHILE_EACH_HOOK(n) \ } \ -- cgit v1.3.1-10-gc9f91