kourendlibrary: Null check

This commit is contained in:
sdburns1998
2019-07-07 15:20:21 +02:00
parent 04197f3d6b
commit b61c98e2a3

View File

@@ -227,9 +227,12 @@ class KourendLibraryOverlay extends Overlay
OverlayUtil.renderPolygon(g, poly, doesPlayerContainBook ? Color.GREEN : Color.WHITE); OverlayUtil.renderPolygon(g, poly, doesPlayerContainBook ? Color.GREEN : Color.WHITE);
Point screen = Perspective.localToCanvas(client, local, client.getPlane(), n.getLogicalHeight()); Point screen = Perspective.localToCanvas(client, local, client.getPlane(), n.getLogicalHeight());
if (screen != null) if (screen != null)
{
if (b != null)
{ {
g.drawImage(b.getIcon(), screen.getX() - (b.getIcon().getWidth() / 2), screen.getY() - b.getIcon().getHeight(), null); g.drawImage(b.getIcon(), screen.getX() - (b.getIcon().getWidth() / 2), screen.getY() - b.getIcon().getHeight(), null);
} }
}
}); });
} }