diff options
author | Sadie Powell <sadie@witchery.services> | 2020-02-15 05:24:24 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-02-15 06:25:12 +0000 |
commit | 169b194788de09259ff513401a02035d164b14c1 (patch) | |
tree | 4d79936b29763f72332026d2ddb6d2b812902a17 | |
parent | a018818635ab72618c42a751ecd5fb02a1cdcda0 (diff) |
Fix logic calling OnList when sending a cap notification.
It is possible for the cap to be null when a DEL for an unloaded
module is sent out so we should not blindly call it.
-rw-r--r-- | src/modules/m_ircv3_capnotify.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_ircv3_capnotify.cpp b/src/modules/m_ircv3_capnotify.cpp index f60c9c737..20efb5845 100644 --- a/src/modules/m_ircv3_capnotify.cpp +++ b/src/modules/m_ircv3_capnotify.cpp @@ -103,7 +103,7 @@ class ModuleIRCv3CapNotify : public Module, public Cap::EventListener, public Re continue; // Check that this user can actually see the cap. - if (!cap->OnList(user)) + if (add && (!cap || !cap->OnList(user))) continue; // If the cap is being added and the client supports cap values then show the value, if any |