summaryrefslogtreecommitdiff
path: root/Penguloon/Objects
diff options
context:
space:
mode:
authoraldrikboy <aldrikboy@gmail.com>2018-01-12 13:32:26 +0100
committeraldrikboy <aldrikboy@gmail.com>2018-01-12 13:32:26 +0100
commitf93e133ede2a76be1aa20a33c9fcf01308cd6df8 (patch)
tree1a906cc08cefd785628ba0e416136f843a37b7f3 /Penguloon/Objects
parent39b1a897eec86f532ca1417698057ae9e1130985 (diff)
dab
Diffstat (limited to 'Penguloon/Objects')
-rw-r--r--Penguloon/Objects/ObjectBase.cs2
1 files changed, 1 insertions, 1 deletions
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());