From 86c702861e2ed911c7cea386395bbef4fa993987 Mon Sep 17 00:00:00 2001 From: MEEP of Faith <54301439+MEEPofFaith@users.noreply.github.com> Date: Mon, 8 Feb 2021 07:44:08 -0800 Subject: [PATCH] Remove NullPointerExeption error (#4624) --- core/src/mindustry/world/Block.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 3b97a9d0e2..d8cca61641 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -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();