Lock mutex when we queue offscreen texture at GlView
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / gl-view / drawable-view-native-renderer.cpp
index 38b5161..7e8c15d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -597,6 +597,7 @@ struct DrawableViewNativeRenderer::Impl
    */
   void InitializeOffscreenFramebuffers()
   {
+    std::scoped_lock<std::recursive_mutex> lock(mTextureQueueMutex);
     for(auto i = 0u; i < mCreateInfo.maxOffscreenBuffers; ++i)
     {
       mFramebufferTexture.emplace_back();