auto_zoom: fix coverity issue 79/319079/2 accepted/tizen_unified accepted/tizen_unified_x tizen accepted/tizen/unified/20250210.160201 accepted/tizen/unified/x/20250212.043736
authorInki Dae <inki.dae@samsung.com>
Tue, 4 Feb 2025 04:36:38 +0000 (13:36 +0900)
committerInki Dae <inki.dae@samsung.com>
Tue, 4 Feb 2025 07:24:29 +0000 (16:24 +0900)
Fix coverity issue, CID-1835643.

Change-Id: Id80f2a6a2c8e6da2fcdb6af1ac799dbb5b3547fa
Signed-off-by: Inki Dae <inki.dae@samsung.com>
services/auto_zoom/src/AutoZoom.cpp

index b190eb2ee309c53bc2acee8e95d442c82a1bece5..bcd49a6537eb85431687b9d13742b5cad8e7ce60 100644 (file)
@@ -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 {