From cd6d35ac75a82863a5921b6ade62a805b5d958fa Mon Sep 17 00:00:00 2001 From: yugecin Date: Sat, 29 Apr 2017 14:52:53 +0200 Subject: [PATCH] fix crash when running for the first time --- src/yugecin/opsudance/core/DisplayContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yugecin/opsudance/core/DisplayContainer.java b/src/yugecin/opsudance/core/DisplayContainer.java index a185910b..9008cf6a 100644 --- a/src/yugecin/opsudance/core/DisplayContainer.java +++ b/src/yugecin/opsudance/core/DisplayContainer.java @@ -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]);