Remove NullPointerExeption error (#4624)

This commit is contained in:
MEEP of Faith 2021-02-08 07:44:08 -08:00 committed by GitHub
parent 47ec13eef4
commit 86c702861e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -428,7 +428,7 @@ public class Block extends UnlockableContent{
TextureRegion reg = getRequestRegion(req, list);
Draw.rect(reg, req.drawx(), req.drawy(), !rotate ? 0 : req.rotation * 90);
if(req.worldContext && player != null && teamRegion.found()){
if(req.worldContext && player != null && teamRegion != null && teamRegion.found()){
if(teamRegions[player.team().id] == teamRegion) Draw.color(player.team().color);
Draw.rect(teamRegions[player.team().id], req.drawx(), req.drawy());
Draw.color();