Fixed Dialog IndexOutOfBounds

This commit is contained in:
iryupnik 2020-03-19 11:05:35 +02:00
parent 3209f8f674
commit 1e1c685530

View File

@ -60,6 +60,8 @@ public class Dialog {
} }
private void showByChar() { private void showByChar() {
if (charNumber >= textLength)
return;
String string = text.substring(0, charNumber); String string = text.substring(0, charNumber);
JLabel textToShow = prepareDialogBar(string); JLabel textToShow = prepareDialogBar(string);
if (dialogBar.getComponentCount() != 0) if (dialogBar.getComponentCount() != 0)