From fdc38633732e29a21baaae82c5e4a5cc1d665c46 Mon Sep 17 00:00:00 2001 From: henrika Date: Tue, 30 Jan 2018 13:03:53 +0100 Subject: [PATCH] Fixes java.lang.NullPointerException in combination with call to onWebRtcAudioTrackInitError() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG=NONE Change-Id: I5758a9f7be1dfd50cf34bf31d3aced2d744f5e58 Reviewed-on: https://webrtc-review.googlesource.com/46061 Reviewed-by: Sami Kalliomäki Commit-Queue: Henrik Andreassson Cr-Commit-Position: refs/heads/master@{#21805} --- .../java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java b/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java index 3c8c9ebb29..79b630a783 100644 --- a/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java +++ b/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java @@ -497,7 +497,7 @@ public class WebRtcAudioTrack { private void reportWebRtcAudioTrackInitError(String errorMessage) { Logging.e(TAG, "Init playout error: " + errorMessage); WebRtcAudioUtils.logAudioState(TAG); - if (errorCallback != null) { + if (errorCallbackOld != null) { errorCallbackOld.onWebRtcAudioTrackInitError(errorMessage); } if (errorCallback != null) { @@ -509,7 +509,7 @@ public class WebRtcAudioTrack { AudioTrackStartErrorCode errorCode, String errorMessage) { Logging.e(TAG, "Start playout error: " + errorCode + ". " + errorMessage); WebRtcAudioUtils.logAudioState(TAG); - if (errorCallback != null) { + if (errorCallbackOld != null) { errorCallbackOld.onWebRtcAudioTrackStartError(errorMessage); } if (errorCallback != null) { @@ -520,7 +520,7 @@ public class WebRtcAudioTrack { private void reportWebRtcAudioTrackError(String errorMessage) { Logging.e(TAG, "Run-time playback error: " + errorMessage); WebRtcAudioUtils.logAudioState(TAG); - if (errorCallback != null) { + if (errorCallbackOld != null) { errorCallbackOld.onWebRtcAudioTrackError(errorMessage); } if (errorCallback != null) {