From a839f95ef36a7ff03b81ebe8867ece09206cee93 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 6 Jun 2023 15:03:58 -0500 Subject: [PATCH] Catch possible race when stopping tone at end of call --- .../java/eu/siacs/conversations/xmpp/jingle/ToneManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/ToneManager.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/ToneManager.java index 9760363d7..954ab6eb1 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/ToneManager.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/ToneManager.java @@ -161,7 +161,10 @@ class ToneManager { currentTone.cancel(true); } if (toneGenerator != null) { - toneGenerator.stopTone(); + // catch race condition with already-released generator + try { + toneGenerator.stopTone(); + } catch (final RuntimeException e) { } } } -- 2.45.2