Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b554bff2 authored by Bjoern Johansson's avatar Bjoern Johansson Committed by Android (Google) Code Review
Browse files

Merge "Fix NDK CameraManager crash when no cameras exist"

parents a6edcbb2 1a5954c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -335,7 +335,7 @@ ACameraManager::getCameraIdList(ACameraIdList** cameraIdList) {
        return ACAMERA_ERROR_NOT_ENOUGH_MEMORY;
    }
    out->numCameras = numCameras;
    out->cameraIds = new const char*[numCameras] {nullptr};
    out->cameraIds = new const char*[numCameras];
    if (!out->cameraIds) {
        ALOGE("Allocate memory for ACameraIdList failed!");
        deleteCameraIdList(out);