Fixes java.lang.NullPointerException in combination with call to onWebRtcAudioTrackInitError()

BUG=NONE

Change-Id: I5758a9f7be1dfd50cf34bf31d3aced2d744f5e58
Reviewed-on: https://webrtc-review.googlesource.com/46061
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21805}
This commit is contained in:
henrika 2018-01-30 13:03:53 +01:00 committed by Commit Bot
parent 775d7ec1bf
commit fdc3863373

View File

@ -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) {