From 9aceed70a2879802c7fe00ea2c0455ccd5c14f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Tue, 26 Feb 2019 02:20:51 +0100 Subject: libcamera: camera: fix bug in error check for streamConfiguration() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The return statement is missing altogether and an error is silently ignored. Fix this and also update the empty map to use the correct type for the map key. Fixes: 65ea2422d24a3073 ("libcamera: camera: extend camera object to support configuration of streams") Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/libcamera/camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 1acb399c..6409d10f 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -213,7 +213,7 @@ std::map Camera::streamConfiguration(std::vector &streams) { if (disconnected_ || !streams.size()) - std::map {}; + return std::map{}; return pipe_->streamConfiguration(this, streams); } -- cgit v1.2.1