summaryrefslogtreecommitdiff
path: root/src/android/camera_hal_manager.cpp
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-03-24 16:07:52 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-03-25 00:45:26 +0200
commit1636d4c4384b8e0db870b606aa946ec9b74d0f03 (patch)
tree10c5023dbe2be706741a08843f20385b4100bb71 /src/android/camera_hal_manager.cpp
parent10518882f380e07deefa762f915344dd7d3ec87f (diff)
android: CameraHalManager: Fix a function call of a moved Camera
libcamera::Camera::id() is called after std::move() in cameraAdded(). This fixes the issue by not executing std::move(). Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/android/camera_hal_manager.cpp')
-rw-r--r--src/android/camera_hal_manager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
index 49bb359e..bf3fcda7 100644
--- a/src/android/camera_hal_manager.cpp
+++ b/src/android/camera_hal_manager.cpp
@@ -116,7 +116,7 @@ void CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)
}
/* Create a CameraDevice instance to wrap the libcamera Camera. */
- std::unique_ptr<CameraDevice> camera = CameraDevice::create(id, std::move(cam));
+ std::unique_ptr<CameraDevice> camera = CameraDevice::create(id, cam);
int ret = camera->initialize();
if (ret) {
LOG(HAL, Error) << "Failed to initialize camera: " << cam->id();