From eb11cc14db861ac8bfe6b93515272a8ab11fb714 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 1 Aug 2020 08:28:10 +0100 Subject: Fix null-checking the wrong variable in the disable module. Closes #1792. --- src/modules/m_disable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_disable.cpp b/src/modules/m_disable.cpp index 9f08cc6b3..95fcd8b4c 100644 --- a/src/modules/m_disable.cpp +++ b/src/modules/m_disable.cpp @@ -55,7 +55,7 @@ class ModuleDisable : public Module // Check that the mode actually exists. ModeHandler* mh = ServerInstance->Modes->FindMode(chr, type); - if (!chr) + if (!mh) throw ModuleException(InspIRCd::Format("Nonexistent mode '%c' was specified in at %s", chr, field.c_str(), tag->getTagLocation().c_str())); -- cgit v1.2.3