From 9ab3f7e5aa616b17ac4876dd9ca35ac232cd9fe1 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 30 Nov 2018 13:20:15 -0500 Subject: [PATCH] Crash fix --- core/src/io/anuke/mindustry/core/Platform.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/io/anuke/mindustry/core/Platform.java b/core/src/io/anuke/mindustry/core/Platform.java index da1e806dc6..0064c066c3 100644 --- a/core/src/io/anuke/mindustry/core/Platform.java +++ b/core/src/io/anuke/mindustry/core/Platform.java @@ -40,7 +40,7 @@ public abstract class Platform { dialog.content().addImageButton("icon-paste", "clear", 16*3, () -> use[0].paste(Gdx.app.getClipboard().getContents(), false)) - .visible(() -> !Gdx.app.getClipboard().getContents().isEmpty()).width(65f); + .visible(() -> Gdx.app.getClipboard() != null && Gdx.app.getClipboard().getContents() != null && !Gdx.app.getClipboard().getContents().isEmpty()).width(65f); TextField to = dialog.content().addField(field.getText(), t-> {}).pad(15).width(250f).get(); to.setMaxLength(maxLength);