From c3e8dd5ff49413a0e6a4ae2e0cf179bf0eee3bb2 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 12 Mar 2018 10:02:59 -0400 Subject: [PATCH] Core\Gameobject: Fix a crash when loading in to panada land. --- Source/Game/Entities/GameObject/GameObject.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Game/Entities/GameObject/GameObject.cs b/Source/Game/Entities/GameObject/GameObject.cs index b745a3cca..048e87740 100644 --- a/Source/Game/Entities/GameObject/GameObject.cs +++ b/Source/Game/Entities/GameObject/GameObject.cs @@ -366,10 +366,9 @@ namespace Game.Entities if (linkedGo != null) { SetLinkedTrap(linkedGo); - map.AddToMap(linkedGo); + if (!map.AddToMap(linkedGo)) + linkedGo.Dispose(); } - else - linkedGo.Dispose(); } return true;