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:
parent
4805231613
commit
6bf62f7ac5
@ -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());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user