From b695bbc4b1c6e46e4483b7a1fbd8d408ece99318 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sat, 2 Aug 2014 00:27:47 -0400 Subject: [PATCH] fix crash after MemorizingTrustManager's TOFU/POP Always/Once/Abort prompt If there is an unknown HTTPS certificate, MemorizingTrustManager puts up a prompt to ask whether the user wants to trust the certificate. It comes at a weird time in the lifecycle of the dialogs, so the previous dialog might be null. Therefore add a null check. This situation should probably be improved and better integrated. --- src/org/fdroid/fdroid/UpdateService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/fdroid/fdroid/UpdateService.java b/src/org/fdroid/fdroid/UpdateService.java index 0638806c9..c7455047e 100644 --- a/src/org/fdroid/fdroid/UpdateService.java +++ b/src/org/fdroid/fdroid/UpdateService.java @@ -180,7 +180,7 @@ public class UpdateService extends IntentService implements ProgressListener { if (finished) { forwardEvent(EVENT_FINISHED); - if (dialog.isShowing()) { + if (dialog != null && dialog.isShowing()) { try { dialog.dismiss(); } catch (IllegalArgumentException e) {