fix crash when running for the first time
This commit is contained in:
parent
c19cc492cc
commit
cd6d35ac75
|
@ -336,7 +336,7 @@ public class DisplayContainer implements ErrorDumpable, KeyListener, MouseListen
|
||||||
|
|
||||||
int width = screenWidth;
|
int width = screenWidth;
|
||||||
int height = screenHeight;
|
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");
|
String[] res = resolutionString.split("x");
|
||||||
width = Integer.parseInt(res[0]);
|
width = Integer.parseInt(res[0]);
|
||||||
height = Integer.parseInt(res[1]);
|
height = Integer.parseInt(res[1]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user