Prevented NPE in StringUtils#splitStringInMultipleRows

This commit is contained in:
CrushedPixel
2015-06-18 15:52:01 +02:00
parent cd996dcf3b
commit cb6f3426f4

View File

@@ -10,6 +10,7 @@ public class StringUtils {
private static final Minecraft mc = Minecraft.getMinecraft();
public static String[] splitStringInMultipleRows(String string, int maxWidth) {
if(string == null) return new String[0];
List<String> rows = new ArrayList<String>();
String remaining = string;
while(remaining.length() > 0) {