QSBEclipseCodeController: null check attached object when destroying

This commit is contained in:
JohnCorby 2022-03-19 21:25:12 -07:00
parent 1e545fe049
commit 2c8f813f3d

View File

@ -24,7 +24,10 @@ public class QSBEclipseCodeController : WorldObject<EclipseCodeController4>
public override void OnRemoval()
{
UnityEngine.Object.Destroy(AttachedObject.gameObject.GetComponent<CodeControllerRemoteUpdater>());
if (AttachedObject)
{
UnityEngine.Object.Destroy(AttachedObject.gameObject.GetComponent<CodeControllerRemoteUpdater>());
}
}
public void SetUser(uint user)