fix rare crash when someone spawns a lot of units (#6243)

This commit is contained in:
TranquillyUnpleasant
2021-10-28 06:38:32 +05:00
committed by GitHub
parent 324c19e425
commit 09f718ba3d

View File

@@ -38,7 +38,7 @@ public class PhysicsProcess implements AsyncProcess{
//find Unit without bodies and assign them
for(Unit entity : group){
if(entity.type == null) continue;
if(entity == null || entity.type == null) continue;
if(entity.physref == null){
PhysicsBody body = new PhysicsBody();