diff --git a/QSB/QuantumSync/Patches/Common/Visibility/VisibilityShapeVisibilityTrackerPatches.cs b/QSB/QuantumSync/Patches/Common/Visibility/VisibilityShapeVisibilityTrackerPatches.cs index 86cf09792..b8a43258c 100644 --- a/QSB/QuantumSync/Patches/Common/Visibility/VisibilityShapeVisibilityTrackerPatches.cs +++ b/QSB/QuantumSync/Patches/Common/Visibility/VisibilityShapeVisibilityTrackerPatches.cs @@ -33,6 +33,13 @@ public static bool IsInFrustum(ShapeVisibilityTracker __instance, Plane[] frustu { // todo : cache this somewhere? seems slow. var quantumObject = __instance.GetComponentInParent(); + + if (quantumObject == null) + { + __result = false; + return true; + } + var worldObject = quantumObject.GetWorldObject(); foreach (var shape in __instance._shapes) {