ui: Null check
This commit is contained in:
@@ -163,7 +163,10 @@ public class ArrowMinimapOverlay extends Overlay
|
|||||||
AffineTransform at = new AffineTransform();
|
AffineTransform at = new AffineTransform();
|
||||||
if (arrowPoint.isMinimapImagePointToTarget())
|
if (arrowPoint.isMinimapImagePointToTarget())
|
||||||
{
|
{
|
||||||
at.translate(minimapPlayerPos.getX(), minimapPlayerPos.getY());
|
if (minimapPlayerPos != null)
|
||||||
|
{
|
||||||
|
at.translate(minimapPlayerPos.getX(), minimapPlayerPos.getY());
|
||||||
|
}
|
||||||
at.rotate(cameraAngle - theta);
|
at.rotate(cameraAngle - theta);
|
||||||
at.translate(0, 66);
|
at.translate(0, 66);
|
||||||
at.translate(minimapImageOffset.getX() - minimapImage.getWidth() / 2, minimapImageOffset.getY() - minimapImage.getHeight() / 2);
|
at.translate(minimapImageOffset.getX() - minimapImage.getWidth() / 2, minimapImageOffset.getY() - minimapImage.getHeight() / 2);
|
||||||
@@ -177,7 +180,10 @@ public class ArrowMinimapOverlay extends Overlay
|
|||||||
double dY = at.getTranslateY();
|
double dY = at.getTranslateY();
|
||||||
//Then apply that position to an un-rotated transform
|
//Then apply that position to an un-rotated transform
|
||||||
at = new AffineTransform();
|
at = new AffineTransform();
|
||||||
at.translate(minimapPlayerPos.getX(), minimapPlayerPos.getY());
|
if (minimapPlayerPos != null)
|
||||||
|
{
|
||||||
|
at.translate(minimapPlayerPos.getX(), minimapPlayerPos.getY());
|
||||||
|
}
|
||||||
at.translate(dX, dY);
|
at.translate(dX, dY);
|
||||||
at.translate(minimapImageOffset.getX() - minimapImage.getWidth() / 2, minimapImageOffset.getY() - minimapImage.getHeight() / 2);
|
at.translate(minimapImageOffset.getX() - minimapImage.getWidth() / 2, minimapImageOffset.getY() - minimapImage.getHeight() / 2);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user