diff --git a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java index 325a8c1e6d27531df458937b295edd7665777d04..238cc5a0130f267bb9eebd25e4de06470d16f0d2 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java @@ -398,7 +398,6 @@ public class HttpDownloadConnection implements Transferable { decryptIfNeeded(); finish(); updateImageBounds(); - if (cb != null) cb.accept(file); } catch (final SSLHandshakeException e) { changeStatus(STATUS_OFFER); } catch (final Exception e) { @@ -410,6 +409,8 @@ public class HttpDownloadConnection implements Transferable { HttpDownloadConnection.this.mXmppConnectionService.getNotificationService().push(message); } cancel(); + } finally { + if (cb != null) cb.accept(file); } }