Skip to content

Commit

Permalink
crash when the fragment is closed too quickly
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Jun 25, 2022
1 parent e49b6e5 commit 69ffa20
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/src/main/java/co/tinode/tindroid/MessagesFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -1006,8 +1006,9 @@ private void releaseAudio(boolean keepRecord) {
}

if (mAudioRecorder != null) {
mAudioRecorder.stop();
mAudioRecorder.reset();
try {
mAudioRecorder.stop();
} catch (RuntimeException ignored) {}
mAudioRecorder.release();
mAudioRecorder = null;
}
Expand Down

0 comments on commit 69ffa20

Please sign in to comment.