aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-03-24 11:45:19 +0000
committerGravatar Sadie Powell2023-03-24 12:01:33 +0000
commit6465ff70e51bf87f107c7827fb7141e75812199b (patch)
treeeaede1261fe8279eff44ce47360e773c2166f0e8 /src
parentSend ERR_PASSWDMISMATCH when the user specifies the wrong password. (diff)
Fix a segfault when sending data to a user without a connect class.
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 646949b5a..7d63659ea 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -301,8 +301,9 @@ void UserIOHandler::AddWriteBuf(const std::string& data)
if (user->quitting_sendq)
return;
- if (!user->quitting && GetSendQSize() + data.length() > user->GetClass()->hardsendqmax &&
- !user->HasPrivPermission("users/flood/increased-buffers"))
+ if (!user->quitting
+ && (user->GetClass() && GetSendQSize() + data.length() > user->GetClass()->hardsendqmax)
+ && !user->HasPrivPermission("users/flood/increased-buffers"))
{
user->quitting_sendq = true;
ServerInstance->GlobalCulls.AddSQItem(user);