Fixes a NullPointerException caused by cancelling an input prompt

This commit is contained in:
Kristian Knarvik 2021-08-21 13:09:18 +02:00
parent c67f3bdd2c
commit cd396eee6b

View File

@ -331,7 +331,7 @@ public final class CommonFunctions {
* @return <p>True if the name is valid</p> * @return <p>True if the name is valid</p>
*/ */
public static boolean nameIsValid(String name) { public static boolean nameIsValid(String name) {
return !name.equals("") && name.matches("[^!?;,]+"); return name != null && !name.equals("") && name.matches("[^!?;,]+");
} }
/** /**