Skip to content

Commit 06cf220

Browse files
Bandaid findpairs issue (#2988)
1 parent ffbfdfe commit 06cf220

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎Robust.Shared/Physics/SharedBroadphaseSystem.cs‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,14 @@ private void FindPairs(
339339

340340
// Logger.DebugS("physics", $"Checking proxy for {proxy.Fixture.Body.Owner} on {broadphase.Owner}");
341341
Box2 aabb;
342-
var proxyBroad = proxyBody.Broadphase!;
342+
var proxyBroad = proxyBody.Broadphase;
343+
344+
if (proxyBroad == null)
345+
{
346+
_logger.Error($"Found null broadphase for {ToPrettyString(proxy.Fixture.Body.Owner)}");
347+
DebugTools.Assert(false);
348+
return;
349+
}
343350

344351
// If it's the same broadphase as our body's one then don't need to translate the AABB.
345352
if (proxyBroad.Owner == broadphase)

0 commit comments

Comments
 (0)