fixed crash caused by race when dedecting if mic is on
This commit is contained in:
parent
e70b6eec98
commit
3577afea4e
|
@ -308,7 +308,12 @@ public class WebRTCWrapper {
|
|||
if (audioTrack == null) {
|
||||
throw new IllegalStateException("Local audio track does not exist (yet)");
|
||||
}
|
||||
return audioTrack.enabled();
|
||||
try {
|
||||
return audioTrack.enabled();
|
||||
} catch (final IllegalStateException e) {
|
||||
//sometimes UI might still be rendering the buttons when a background thread has already ended the call
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void setMicrophoneEnabled(final boolean enabled) {
|
||||
|
|
Loading…
Reference in New Issue