Index: webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java |
diff --git a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java |
index a13a7d552b5fcb82b5346bdbd417bdd19fb2d81d..181910a5343cf1b434a3e8a9284056902247b1d3 100644 |
--- a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java |
+++ b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java |
@@ -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()); |
} |