Skip to content

Commit

Permalink
Adds null check on input (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxEdwards20 authored Apr 19, 2024
1 parent 3a3a992 commit 1000ef8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Server/Systems/Network.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ private void registerHandler(Shared.Messages.Type type, Handler handler)
/// <param name="message"></param>
private void handleInput(Shared.Messages.Input message)
{
if (!m_entities.ContainsKey(message.entityId)) return;
var entity = m_entities[message.entityId];
var worm = WormMovement.getWormFromHead(entity, m_entities);
var update = false;
Expand Down

0 comments on commit 1000ef8

Please sign in to comment.