null PeerConnection reference before disposing; otherwise getState() might be issued against disposed object
This commit is contained in:
parent
80d195d35e
commit
2c7c44e957
|
@ -445,8 +445,8 @@ public class WebRTCWrapper {
|
||||||
final AppRTCAudioManager audioManager = this.appRTCAudioManager;
|
final AppRTCAudioManager audioManager = this.appRTCAudioManager;
|
||||||
final EglBase eglBase = this.eglBase;
|
final EglBase eglBase = this.eglBase;
|
||||||
if (peerConnection != null) {
|
if (peerConnection != null) {
|
||||||
dispose(peerConnection);
|
|
||||||
this.peerConnection = null;
|
this.peerConnection = null;
|
||||||
|
dispose(peerConnection);
|
||||||
}
|
}
|
||||||
if (audioManager != null) {
|
if (audioManager != null) {
|
||||||
toneManager.setAppRtcAudioManagerHasControl(false);
|
toneManager.setAppRtcAudioManagerHasControl(false);
|
||||||
|
@ -467,6 +467,7 @@ public class WebRTCWrapper {
|
||||||
this.eglBase = null;
|
this.eglBase = null;
|
||||||
}
|
}
|
||||||
if (peerConnectionFactory != null) {
|
if (peerConnectionFactory != null) {
|
||||||
|
this.peerConnectionFactory = null;
|
||||||
peerConnectionFactory.dispose();
|
peerConnectionFactory.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue