Merge pull request #4558 from deathbeam/fix-null-and-emtpy-names

Fix NPE when trying to draw null names
This commit is contained in:
Tomas Slusny
2018-07-30 10:32:01 +02:00
committed by GitHub
2 changed files with 13 additions and 3 deletions

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();