Fixed null pointer exception

This commit is contained in:
Sylvain Berfini 2019-11-04 15:56:26 +01:00
parent ef1c04eab5
commit 0c75dbd9dd

View file

@ -437,7 +437,7 @@ public class CallActivity extends LinphoneGenericActivity
Call call = mCore.getCurrentCall();
boolean videoEnabled =
LinphonePreferences.instance().isVideoEnabled()
&& call.getCurrentParams().videoEnabled();
&& call != null && call.getCurrentParams().videoEnabled();
if (videoEnabled) {
mAudioManager = LinphoneManager.getAudioManager();
@ -825,7 +825,7 @@ public class CallActivity extends LinphoneGenericActivity
boolean videoEnabled =
LinphonePreferences.instance().isVideoEnabled()
&& call.getCurrentParams().videoEnabled();
&& call != null && call.getCurrentParams().videoEnabled();
showVideoControls(videoEnabled);
}