From 169b194788de09259ff513401a02035d164b14c1 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 15 Feb 2020 05:24:24 +0000 Subject: 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. --- src/modules/m_ircv3_capnotify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/m_ircv3_capnotify.cpp') 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 -- cgit v1.3.1-10-gc9f91