From a5beaaed9de10a85f6c21166c65a60848c1e9f09 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 24 Apr 2020 21:27:00 +0200 Subject: [PATCH] null reference to rtpconnection when end card is reached this will make re-init work if for example retry end card had been reached and we get another call --- .../java/eu/siacs/conversations/ui/RtpSessionActivity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java b/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java index 4758cdca9..acd9d151e 100644 --- a/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java @@ -766,8 +766,6 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe if (state == RtpEndUserState.ENDED) { finish(); return; - } else if (END_CARD.contains(state)) { - resetIntent(account, with, state, requireRtpConnection().getMedia()); } runOnUiThread(() -> { updateStateDisplay(state); @@ -775,9 +773,12 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe updateVideoViews(state); updateProfilePicture(state); }); + if (END_CARD.contains(state)) { + resetIntent(account, with, state, requireRtpConnection().getMedia()); + this.rtpConnectionReference = null; + } } else { Log.d(Config.LOGTAG, "received update for other rtp session"); - //TODO if we only ever have one; we might just switch over? Maybe! } }