Avoids java.lang.NullPointerException in WebRtcAudioRecord

BUG=NONE

Review-Url: https://codereview.webrtc.org/2276973003
Cr-Commit-Position: refs/heads/master@{#13922}
This commit is contained in:
henrika 2016-08-25 05:16:22 -07:00 committed by Commit bot
parent 4805231613
commit 6bf62f7ac5

View File

@ -105,7 +105,9 @@ public class WebRtcAudioRecord {
}
try {
audioRecord.stop();
if (audioRecord != null) {
audioRecord.stop();
}
} catch (IllegalStateException e) {
Logging.e(TAG, "AudioRecord.stop failed: " + e.getMessage());
}