[Tizen] Add a mutex lock to a method of NativeImageSource 55/269355/1
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 13 Jan 2022 05:31:07 +0000 (14:31 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 13 Jan 2022 05:31:14 +0000 (14:31 +0900)
Change-Id: I5a9c50a915abb2e8764d1c0f9505c68b2445f2dd

dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp

index f8e8f7c..153848f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@ namespace Adaptor
 {
 namespace
 {
-const char* SAMPLER_TYPE    = "samplerExternalOES";
+const char* SAMPLER_TYPE = "samplerExternalOES";
 
 // clang-format off
 tbm_format FORMATS_BLENDING_REQUIRED[] = {
@@ -556,6 +556,7 @@ bool NativeImageSourceTizen::ReleaseBuffer()
 
 void NativeImageSourceTizen::SetResourceDestructionCallback(EventThreadCallback* callback)
 {
+  Dali::Mutex::ScopedLock lock(mMutex);
   mResourceDestructionCallback = std::unique_ptr<EventThreadCallback>(callback);
 }