1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 12:23:13 +02:00

Fix NULL pointer crash due to reputation code changes from yesterday

This commit is contained in:
Bram Matthys
2023-09-18 09:16:17 +02:00
parent 53c3ae6403
commit 311f7397f5
+3 -1
View File
@@ -1334,6 +1334,8 @@ CMD_FUNC(reputation_server_cmd)
if (score > REPUTATION_SCORE_CAP)
score = REPUTATION_SCORE_CAP;
if (score < 0)
score = 0;
e = find_reputation_entry(ip);
if (allow_reply && e && (e->score > score) && (e->score - score > UPDATE_SCORE_MARGIN))
@@ -1365,7 +1367,7 @@ CMD_FUNC(reputation_server_cmd)
e->score = score;
reputation_changed_update_users(e);
} else
if (forced)
if (e && forced)
{
#ifdef DEBUGMODE
unreal_log(ULOG_DEBUG, "reputation", "REPUTATION_DECREASE", client,