* commit '6cbd7a8f4fd921ea1b0ad3d1da0580b384a1855e': camera2: Don't NPE when closing the CameraDevice
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user