From fbf111a2c9cca5567f63383f22c08b19be2ec30b Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 7 Dec 2022 16:30:12 -0500 Subject: [PATCH] Do not require active rtp connection when DTMF button is pressed Just ignore the button press is there isn't one. --- .../java/eu/siacs/conversations/ui/RtpSessionActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java b/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java index e21210412..6dd2a7e25 100644 --- a/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/RtpSessionActivity.java @@ -160,7 +160,9 @@ public class RtpSessionActivity extends XmppActivity setSupportActionBar(binding.toolbar); binding.dialpad.setClickConsumer(tag -> { - requireRtpConnection().applyDtmfTone(tag); + final JingleRtpConnection connection = + this.rtpConnectionReference != null ? this.rtpConnectionReference.get() : null; + if (connection != null) connection.applyDtmfTone(tag); }); if (savedInstanceState != null) { -- 2.45.2