diff --git a/Assets/Scripts/PlacementSystem/SlotManager.cs b/Assets/Scripts/PlacementSystem/SlotManager.cs index d206d21..353576a 100644 --- a/Assets/Scripts/PlacementSystem/SlotManager.cs +++ b/Assets/Scripts/PlacementSystem/SlotManager.cs @@ -11,7 +11,7 @@ public class SlotManager : MonoBehaviour public HealthComponent TowerHealth; - public bool IsOccupied => TowerHealth.TryGetComponent(out HealthComponent _); + public bool IsOccupied => TowerHealth != null && TowerHealth.TryGetComponent(out HealthComponent _); public Transform TowerSpawnPoint;