From 029ff235e184acc8194e76ef535e437cb6c9f614 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 20 Dec 2020 00:25:18 +0000 Subject: Fix an inverted condition in the previous commit. --- include/event.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/event.h b/include/event.h index 7e8e64c7d..b4b695d0e 100644 --- a/include/event.h +++ b/include/event.h @@ -184,7 +184,7 @@ inline bool Events::ModuleEventProvider::ElementComp::operator()(Events::ModuleE * FOREACH_MOD_CUSTOM(accountevprov, AccountEventListener, OnAccountChange, MOD_RESULT, (user, newaccount)) */ #define FOREACH_MOD_CUSTOM(prov, listenerclass, func, params) do { \ - if (!(prov).GetModule() || (prov).GetModule()->dying) \ + if ((prov).GetModule() && !(prov).GetModule()->dying) \ { \ const ::Events::ModuleEventProvider::SubscriberList& _handlers = (prov).GetSubscribers(); \ for (::Events::ModuleEventProvider::SubscriberList::const_iterator _i = _handlers.begin(); _i != _handlers.end(); ++_i) \ @@ -206,7 +206,7 @@ inline bool Events::ModuleEventProvider::ElementComp::operator()(Events::ModuleE */ #define FIRST_MOD_RESULT_CUSTOM(prov, listenerclass, func, result, params) do { \ result = MOD_RES_PASSTHRU; \ - if (!(prov).GetModule() || (prov).GetModule()->dying) \ + if ((prov).GetModule() && !(prov).GetModule()->dying) \ { \ const ::Events::ModuleEventProvider::SubscriberList& _handlers = (prov).GetSubscribers(); \ for (::Events::ModuleEventProvider::SubscriberList::const_iterator _i = _handlers.begin(); _i != _handlers.end(); ++_i) \ -- cgit v1.2.3