From b7e6d51f97b2826082c15b0075d3845a483fb190 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sat, 16 Oct 2021 14:45:13 +0800 Subject: [PATCH] [Mobile] prevent NPE on deck import --- forge-gui-mobile/src/forge/deck/FDeckImportDialog.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/forge-gui-mobile/src/forge/deck/FDeckImportDialog.java b/forge-gui-mobile/src/forge/deck/FDeckImportDialog.java index a28ba25d567..00b854d4d36 100644 --- a/forge-gui-mobile/src/forge/deck/FDeckImportDialog.java +++ b/forge-gui-mobile/src/forge/deck/FDeckImportDialog.java @@ -63,7 +63,10 @@ public class FDeckImportDialog extends FDialog { callback = callback0; controller = new DeckImportController(replacingDeck, newEditionCheck, dateTimeCheck, onlyCoreExpCheck, monthDropdown, yearDropdown); - txtInput.setText(Forge.getClipboard().getContents()); //just pull import directly off the clipboard + String contents = Forge.getClipboard().getContents(); + if (contents == null) + contents = ""; //prevent NPE + txtInput.setText(contents); initButton(0, Localizer.getInstance().getMessage("lblImport"), new FEventHandler() { @Override