Add null check to wires (#11974)
This commit is contained in:
@@ -484,9 +484,12 @@ public sealed class WiresSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
_audio.PlayPvs(component.ScrewdriverCloseSound, args.Target);
|
_audio.PlayPvs(component.ScrewdriverCloseSound, args.Target);
|
||||||
var ui = _uiSystem.GetUiOrNull(args.Target, WiresUiKey.Key);
|
var ui = _uiSystem.GetUiOrNull(args.Target, WiresUiKey.Key);
|
||||||
|
if (ui != null)
|
||||||
|
{
|
||||||
_uiSystem.CloseAll(ui);
|
_uiSystem.CloseAll(ui);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void OnExamine(EntityUid uid, WiresComponent component, ExaminedEvent args)
|
private void OnExamine(EntityUid uid, WiresComponent component, ExaminedEvent args)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user