From: Hwankyu Jhun Date: Tue, 23 Jun 2020 00:23:28 +0000 (+0900) Subject: Lock the mutex in the callback functions X-Git-Tag: submit/tizen/20200623.004459~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a6f4c8281f17f1daff33c997d6e6fb36de977e4;p=platform%2Fcore%2Fapi%2Fmedia-key.git Lock the mutex in the callback functions Change-Id: I13be0e6d75a0e768e2fd37bd0b090f4e665fb42a Signed-off-by: Hwankyu Jhun --- diff --git a/src/media_key.cc b/src/media_key.cc index 5a5763d..ce30c0c 100644 --- a/src/media_key.cc +++ b/src/media_key.cc @@ -172,6 +172,7 @@ class MediaKey { } auto* handle = static_cast(data); + std::lock_guard lock(handle->GetMutex()); if (handle->cb_ == nullptr) return ECORE_CALLBACK_RENEW; @@ -191,6 +192,7 @@ class MediaKey { } auto* handle = static_cast(data); + std::lock_guard lock(handle->GetMutex()); if (handle->cb_ == nullptr) return ECORE_CALLBACK_RENEW;