Fix NPE in region overlap check.
This commit fixes an issue with the new `intersects()` method on ArenaRegion. Instead of blindly assuming that the region points `p1` and `p2` are set when the method is called, we first make sure both regions are properly set. Fixes #590
This commit is contained in:
@@ -248,7 +248,10 @@ public class ArenaRegion
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return intersects(p1, p2, other.p1, other.p2);
|
||||
if (setup && other.setup) {
|
||||
return intersects(p1, p2, other.p1, other.p2);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean intersects(Location a1, Location a2, Location b1, Location b2) {
|
||||
|
||||
Reference in New Issue
Block a user