Fix crash when clicking a deleted entity in the dropdown list (#1475)

This commit is contained in:
DrSmugleaf
2020-07-24 20:18:42 +02:00
committed by GitHub
parent 245dbdaa3a
commit a6931e5773

View File

@@ -443,6 +443,13 @@ namespace Content.Client.GameObjects.EntitySystems
if (args.Function == EngineKeyFunctions.Use ||
args.Function == ContentKeyFunctions.Point)
{
// TODO: Remove an entity from the menu when it is deleted
if (_entity.Deleted)
{
_master.CloseAllMenus();
return;
}
var inputSys = _master.EntitySystemManager.GetEntitySystem<InputSystem>();
var func = args.Function;