summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/pipeline_handler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index a20cd27d..1fc22d6a 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -205,11 +205,11 @@ void PipelineHandler::release(Camera *camera)
ASSERT(useCount_);
+ releaseDevice(camera);
+
if (useCount_ == 1)
unlockMediaDevices();
- releaseDevice(camera);
-
--useCount_;
}