Nullability fixes.

This commit is contained in:
Pieter-Jan Briers
2020-08-20 16:48:00 +02:00
parent 3372ab050c
commit ed1a96e536
47 changed files with 159 additions and 158 deletions

View File

@@ -33,7 +33,7 @@ namespace Content.Client.GameObjects.Components.Body
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
{
if (!Owner.TryGetComponent(out ISpriteComponent sprite))
if (!Owner.TryGetComponent(out ISpriteComponent? sprite))
{
return;
}
@@ -50,7 +50,7 @@ namespace Content.Client.GameObjects.Components.Body
if (!partRemoved.Dropped.HasValue ||
!_entityManager.TryGetEntity(partRemoved.Dropped.Value, out var entity) ||
!entity.TryGetComponent(out ISpriteComponent droppedSprite))
!entity.TryGetComponent(out ISpriteComponent? droppedSprite))
{
break;
}