diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index 0a7aa174b..90d5b1760 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -452,10 +452,13 @@ public class LinphoneActivity extends TabActivity implements ContactPicked Log.d("Phone orientation changed to ", degrees); int rotation = (360 - degrees) % 360; - LinphoneManager.getLc().setDeviceRotation(rotation); - LinphoneCall currentCall = LinphoneManager.getLc().getCurrentCall(); - if (currentCall != null && currentCall.cameraEnabled() && currentCall.getCurrentParamsCopy().getVideoEnabled()) { - LinphoneManager.getLc().updateCall(currentCall, null); + LinphoneCore lc=LinphoneManager.getLcIfManagerNotDestroyedOrNull(); + if (lc!=null){ + lc.setDeviceRotation(rotation); + LinphoneCall currentCall = lc.getCurrentCall(); + if (currentCall != null && currentCall.cameraEnabled() && currentCall.getCurrentParamsCopy().getVideoEnabled()) { + lc.updateCall(currentCall, null); + } } } } diff --git a/src/org/linphone/VideoCallActivity.java b/src/org/linphone/VideoCallActivity.java index 979ce5dcc..57a524308 100755 --- a/src/org/linphone/VideoCallActivity.java +++ b/src/org/linphone/VideoCallActivity.java @@ -177,7 +177,8 @@ public class VideoCallActivity extends Activity implements }); if (!AndroidCameraConfiguration.hasSeveralCameras()) { - findViewById(R.id.switch_camera).setVisibility(View.GONE); + View v=findViewById(R.id.switch_camera); + if (v!=null) v.setVisibility(View.GONE); } if (Version.isXLargeScreen(this)) {