Fix errors

This commit is contained in:
DrSmugleaf
2021-12-05 21:02:04 +01:00
parent 2a3b7d809d
commit ab9d0cc6d8
94 changed files with 568 additions and 591 deletions

View File

@@ -32,10 +32,9 @@ namespace Content.Server.Examine
{
var player = (IPlayerSession) eventArgs.SenderSession;
var session = eventArgs.SenderSession;
var playerEnt = session.AttachedEntity;
var channel = player.ConnectedClient;
if (playerEnt == default
if (session.AttachedEntity is not {Valid: true} playerEnt
|| !EntityManager.EntityExists(request.EntityUid)
|| !CanExamine(playerEnt, request.EntityUid))
{