From f6cfd516c7b991d7af22f367904e89332f140b58 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 16 Mar 2022 14:23:54 -0400 Subject: [PATCH] v1.2.0: fixed crashes caused by wndTextInput offsetting on init --- .../shatteredpixel/shatteredpixeldungeon/ui/WndTextInput.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/WndTextInput.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/WndTextInput.java index 9e312a198..26ab4b717 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/WndTextInput.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/WndTextInput.java @@ -131,7 +131,9 @@ public class WndTextInput extends Window { @Override public void offset(int xOffset, int yOffset) { super.offset(xOffset, yOffset); - textBox.setRect(textBox.left(), textBox.top(), textBox.width(), textBox.height()); + if (textBox != null){ + textBox.setRect(textBox.left(), textBox.top(), textBox.width(), textBox.height()); + } } public void onSelect(boolean positive, String text){ }