From 925a6101a89ef045b2c97ab79f5a6f7fa5aa4340 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 25 Oct 2023 08:55:09 -0500 Subject: [PATCH] Fix NPE --- .../java/com/cheogram/android/DownloadDefaultStickers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cheogram/java/com/cheogram/android/DownloadDefaultStickers.java b/src/cheogram/java/com/cheogram/android/DownloadDefaultStickers.java index 96cc28fbbfebe68feaf159504d2261827f579ad9..cb59e47321cc284242e33b6cb0a893df11cfad5a 100644 --- a/src/cheogram/java/com/cheogram/android/DownloadDefaultStickers.java +++ b/src/cheogram/java/com/cheogram/android/DownloadDefaultStickers.java @@ -69,7 +69,7 @@ public class DownloadDefaultStickers extends Service { @Override public int onStartCommand(Intent intent, int flags, int startId) { if (http == null) { - http = HttpConnectionManager.newBuilder(intent.getBooleanExtra("tor", getResources().getBoolean(R.bool.use_tor))).build(); + http = HttpConnectionManager.newBuilder(intent == null ? getResources().getBoolean(R.bool.use_tor) : intent.getBooleanExtra("tor", getResources().getBoolean(R.bool.use_tor))).build(); } synchronized(pendingPacks) { pendingPacks.add(intent.getData() == null ? Uri.parse("https://stickers.cheogram.com/index.json") : intent.getData());