fix crash when running for the first time

This commit is contained in:
yugecin 2017-04-29 14:52:53 +02:00
parent c19cc492cc
commit cd6d35ac75

View File

@ -336,7 +336,7 @@ public class DisplayContainer implements ErrorDumpable, KeyListener, MouseListen
int width = screenWidth;
int height = screenHeight;
if (resolutionString.matches("^[0-9]+x[0-9]+$")) {
if (resolutionString != null && resolutionString.matches("^[0-9]+x[0-9]+$")) {
String[] res = resolutionString.split("x");
width = Integer.parseInt(res[0]);
height = Integer.parseInt(res[1]);