diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/banglejs/AppsManagementActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/banglejs/AppsManagementActivity.java index a18b201f1..3470b7803 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/banglejs/AppsManagementActivity.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/banglejs/AppsManagementActivity.java @@ -315,6 +315,10 @@ public class AppsManagementActivity extends AbstractGBActivity { fileChooserCallback = null; } if (requestCode == CREATE_FILE) { // showSaveFileDialog + if (resultCode == Activity.RESULT_CANCELED || intent == null || intent.getData() == null) { + return; + } + OutputStream os = null; try { os = getContentResolver().openOutputStream(intent.getData());