Skip to content

Commit

Permalink
Remove NullPointerExeption error (#4624)
Browse files Browse the repository at this point in the history
  • Loading branch information
MEEPofFaith authored Feb 8, 2021
1 parent 47ec13e commit 86c7028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/mindustry/world/Block.java
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public void drawRequestRegion(BuildPlan req, Eachable<BuildPlan> list){
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();
Expand Down

0 comments on commit 86c7028

Please sign in to comment.