Skip to content

Commit c646846

Browse files
committed
fixed a possible nre
1 parent 8acb6d9 commit c646846

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Common Utilities/EventHandlers/PlayerHandlers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void OnPlayerHurting(HurtingEventArgs ev)
125125

126126
public void OnEscaping(EscapingEventArgs ev)
127127
{
128-
if (ev.Player.IsCuffed && config.DisarmedEscapeSwitchRole.TryGetValue(ev.Player.Role, out RoleTypeId newRole))
128+
if (ev.Player.IsCuffed && config.DisarmedEscapeSwitchRole is not null && config.DisarmedEscapeSwitchRole.TryGetValue(ev.Player.Role, out RoleTypeId newRole))
129129
{
130130
ev.NewRole = newRole;
131131
ev.IsAllowed = newRole != RoleTypeId.None;

0 commit comments

Comments
 (0)