From c41a938c47032334e824142452a2e685c4e9b92c Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Wed, 27 Jul 2022 17:58:17 +0900 Subject: [PATCH] mv_machine_learning: fix seg. fault [Version] : 0.23.8 [Issue type] : bug fix Fixed a bug that seg. fault happens when mv_face_recognition_destroy() is called just after mv_face_recognition_create(). _label_manager of FaceRecognition class has no instance at mv_face_recognition_create() call so check if _label_manager is nullptr or not. Change-Id: Ie7948e4f6152f1ad3237600ab6ae64bc88e0ebf9 Signed-off-by: Inki Dae --- mv_machine_learning/face_recognition/src/face_recognition.cpp | 3 ++- packaging/capi-media-vision.spec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mv_machine_learning/face_recognition/src/face_recognition.cpp b/mv_machine_learning/face_recognition/src/face_recognition.cpp index 13b120d..2671134 100644 --- a/mv_machine_learning/face_recognition/src/face_recognition.cpp +++ b/mv_machine_learning/face_recognition/src/face_recognition.cpp @@ -53,7 +53,8 @@ FaceRecognition::FaceRecognition() : FaceRecognition::~FaceRecognition() { - _label_manager->Clear(); + if (_label_manager) + _label_manager->Clear(); } void FaceRecognition::CheckFeatureVectorFile(unique_ptr& old_fvm, unique_ptr& new_fvm) diff --git a/packaging/capi-media-vision.spec b/packaging/capi-media-vision.spec index e25aa65..4df997c 100644 --- a/packaging/capi-media-vision.spec +++ b/packaging/capi-media-vision.spec @@ -1,6 +1,6 @@ Name: capi-media-vision Summary: Media Vision library for Tizen Native API -Version: 0.23.7 +Version: 0.23.8 Release: 0 Group: Multimedia/Framework License: Apache-2.0 and BSD-3-Clause -- 2.7.4