Skip to content

Commit

Permalink
Fixes: #133
Browse files Browse the repository at this point in the history
App crashes on try to export an audio note whilst creating a new audio note, but without recording anything.
  • Loading branch information
coderPaddyS committed Jan 15, 2023
1 parent d4c4f2e commit 953e208
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,10 @@ class AudioNoteActivity : BaseNoteActivity(DbContract.NoteEntry.TYPE_AUDIO) {
destination = FileOutputStream(file).channel
destination.transferFrom(source, 0, source.size())
} finally {
source!!.close()
destination!!.close()
source?.close()
destination?.close()
}

// Tell the media scanner about the new file so that it is
// immediately available to the user.
MediaScannerConnection.scanFile(
Expand Down

0 comments on commit 953e208

Please sign in to comment.