From f93e133ede2a76be1aa20a33c9fcf01308cd6df8 Mon Sep 17 00:00:00 2001 From: aldrikboy Date: Fri, 12 Jan 2018 13:32:26 +0100 Subject: dab --- Penguloon/Objects/ObjectBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Penguloon/Objects/ObjectBase.cs') diff --git a/Penguloon/Objects/ObjectBase.cs b/Penguloon/Objects/ObjectBase.cs index 5bfdcb9..c5b17be 100644 --- a/Penguloon/Objects/ObjectBase.cs +++ b/Penguloon/Objects/ObjectBase.cs @@ -65,7 +65,7 @@ namespace Penguloon.Objects // loop from back of list to front so we always focus the balloons in front for (int i = Map.Enemies.Count - 1; i >= 0; i--) { - if (Contains(Map.Enemies[i].Box.Center.ToVector2())) + if (Map.Enemies[i] != null && Contains(Map.Enemies[i].Box.Center.ToVector2())) { if(ShouldRotate) Rotation = (float)GetRotation(Map.Enemies[i].Box.Center.ToVector2()); -- cgit v1.2.3-70-g09d2