Skip to content

Commit

Permalink
Fixed issue where first-launch would cause a crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
coltonk9043 committed Sep 22, 2024
1 parent aee575b commit 69d29e9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void draw(DrawContext drawContext, float partialTicks) {
Render2D.drawString(drawContext, title, actualX, actualY + 8, 0xFFFFFF);
Render2D.drawOutlinedRoundedBox(matrix4f, actualX + actualWidth - 150, actualY, 150, actualHeight, 3.0f, borderColor, new Color(115, 115, 115, 200));

if (!text.isEmpty()) {
if (text != null && !text.isEmpty()) {
int visibleStringLength = 120 / 10;
String visibleString = text.substring(Math.max(0, text.length() - visibleStringLength - 1), text.length());
Render2D.drawString(drawContext, visibleString, actualX + actualWidth - 145, actualY + 8, 0xFFFFFF);
Expand Down

0 comments on commit 69d29e9

Please sign in to comment.