Skip to content
This repository has been archived by the owner on Sep 10, 2020. It is now read-only.

Commit

Permalink
Merge pull request #98 from JakeWharton/jw/crash-on-null
Browse files Browse the repository at this point in the history
Crash eagerly when the Uri is missing.
  • Loading branch information
JakeWharton committed Apr 3, 2016
2 parents 9e55cd4 + c48800d commit bf44dca
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ private void stopRecording() {
MediaScannerConnection.scanFile(context, new String[] { outputFile }, null,
new MediaScannerConnection.OnScanCompletedListener() {
@Override public void onScanCompleted(String path, final Uri uri) {
if (uri == null) throw new NullPointerException("uri == null");
Timber.d("Media scanner completed.");
mainThread.post(new Runnable() {
@Override public void run() {
Expand Down

0 comments on commit bf44dca

Please sign in to comment.