fix rare crash when someone spawns a lot of units (#6243)
This commit is contained in:
committed by
GitHub
parent
324c19e425
commit
09f718ba3d
@@ -38,7 +38,7 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
|
|
||||||
//find Unit without bodies and assign them
|
//find Unit without bodies and assign them
|
||||||
for(Unit entity : group){
|
for(Unit entity : group){
|
||||||
if(entity.type == null) continue;
|
if(entity == null || entity.type == null) continue;
|
||||||
|
|
||||||
if(entity.physref == null){
|
if(entity.physref == null){
|
||||||
PhysicsBody body = new PhysicsBody();
|
PhysicsBody body = new PhysicsBody();
|
||||||
|
|||||||
Reference in New Issue
Block a user