diff --git a/src/RemoteTech/UI/FilterOverlay.cs b/src/RemoteTech/UI/FilterOverlay.cs index 48f275f89..922ac6771 100644 --- a/src/RemoteTech/UI/FilterOverlay.cs +++ b/src/RemoteTech/UI/FilterOverlay.cs @@ -78,7 +78,10 @@ private Rect Position mImg = obj.GetChild("bg (stretch)").GetComponent(); } - posX = mImg.rectTransform.rect.width * GameSettings.UI_SCALE; + if (mImg != null) + { + posX = mImg.rectTransform.rect.width * GameSettings.UI_SCALE; + } } return new Rect(posX, posY, mTextures.Background.width * GameSettings.UI_SCALE, mTextures.Background.height * GameSettings.UI_SCALE); @@ -104,7 +107,11 @@ private Rect PositionSatellite if(obj != null) mImg = obj.GetChild("bg (stretch)").GetComponent(); } - posX = mImg.rectTransform.rect.width * GameSettings.UI_SCALE; + + if (mImg != null) + { + posX = mImg.rectTransform.rect.width * GameSettings.UI_SCALE; + } } return new Rect(posX, Screen.height - height, width, height);