diff options
| -rw-r--r-- | core/java/android/hardware/camera2/impl/CameraDevice.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/hardware/camera2/impl/CameraDevice.java b/core/java/android/hardware/camera2/impl/CameraDevice.java index 64e4dc9..86a073f 100644 --- a/core/java/android/hardware/camera2/impl/CameraDevice.java +++ b/core/java/android/hardware/camera2/impl/CameraDevice.java @@ -301,7 +301,9 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice { synchronized (mLock) { try { - mRemoteDevice.disconnect(); + if (mRemoteDevice != null) { + mRemoteDevice.disconnect(); + } } catch (CameraRuntimeException e) { throw e.asChecked(); } catch (RemoteException e) { |
