Fix NPE when trying to draw null names

Fix null pointer exceptions when trying to draw null names on screen.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-07-29 23:45:56 +02:00
parent aa75201fe4
commit 1c13a1bde4

View File

@@ -24,6 +24,7 @@
*/
package net.runelite.client.ui.overlay;
import com.google.common.base.Strings;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
@@ -67,6 +68,11 @@ public class OverlayUtil
public static void renderTextLocation(Graphics2D graphics, Point txtLoc, String text, Color color)
{
if (Strings.isNullOrEmpty(text))
{
return;
}
int x = txtLoc.getX();
int y = txtLoc.getY();