From 4e67e1526180ffd7d93d107a27f25bb10b0d6887 Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Tue, 4 Feb 2025 13:36:38 +0900 Subject: [PATCH] auto_zoom: fix coverity issue Fix coverity issue, CID-1835643. Change-Id: Id80f2a6a2c8e6da2fcdb6af1ac799dbb5b3547fa Signed-off-by: Inki Dae --- services/auto_zoom/src/AutoZoom.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/services/auto_zoom/src/AutoZoom.cpp b/services/auto_zoom/src/AutoZoom.cpp index b190eb2..bcd49a6 100644 --- a/services/auto_zoom/src/AutoZoom.cpp +++ b/services/auto_zoom/src/AutoZoom.cpp @@ -170,8 +170,17 @@ void AutoZoom::configure(InputConfigBase &config) AutoZoom::~AutoZoom() { if (_async_mode) { - _input_service->streamOff(); - _async_manager->destroy(); + try { + _input_service->streamOff(); + } catch (const system_error &e) { + SINGLEO_LOGE("Failed to stop streaming: %s", e.what()); + } + + try { + _async_manager->destroy(); + } catch (const system_error &e) { + SINGLEO_LOGE("Failed to destroy async manager: %s", e.what()); + } } try { -- 2.34.1