summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-06-06 14:14:09 +0100
committerPeter Powell <petpow@saberuk.com>2019-06-06 14:14:46 +0100
commit87bbf574bde2149daed9f9967f33ceae13250b70 (patch)
tree1953da27efc13c0adf14b5f20bafbf6c8e8c45d3 /include/modules.h
parentd2ebf5083be476d73f468e9f45e369576bd3df2c (diff)
Only call events on modules which aren't dying.
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h6
1 files changed, 4 insertions, 2 deletions
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) \
} \