[Tizen] Let we make adaptor invalidate if adaptor stop 14/307914/2 accepted/tizen/8.0/unified/20240318.143314
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 12 Mar 2024 07:05:14 +0000 (16:05 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Fri, 15 Mar 2024 06:24:31 +0000 (15:24 +0900)
There was some issue when we try to destruct some singletone class
during application shutting down.

Since Adaptor still available, some singletone class try to access another
singletone class inside of it's destructor. It might make some problem.

To avoid it, let we check that adaptor is stopped at IsAvailable() API.

And also, Let we clean-up all registered processor at Stop timing,
to avoid unmatched behaviour after we change IsAvailable return false even
Core alive.

Change-Id: I039578613d5e79b80b091fef4d7993779a395dfb
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
19 files changed:
automated-tests/src/dali-adaptor/utc-Dali-NativeImageSource.cpp
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/adaptor.cpp
dali/internal/imaging/android/native-image-source-impl-android.cpp
dali/internal/imaging/macos/native-image-source-impl-mac.cpp
dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp
dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp
dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp
dali/internal/imaging/windows/native-image-source-impl-win.cpp
dali/internal/imaging/x11/native-image-source-impl-x.cpp
dali/internal/legacy/common/tizen-platform-abstraction.cpp
dali/internal/system/android/timer-impl-android.cpp
dali/internal/system/linux/timer-impl-ecore.cpp
dali/internal/window-system/android/window-system-android.cpp
dali/internal/window-system/tizen-wayland/ecore-wl/window-system-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-system-ecore-wl2.cpp
dali/internal/window-system/ubuntu-x11/window-system-ecore-x.cpp
dali/internal/window-system/windows/window-system-win.cpp
dali/internal/window-system/x11/window-system-x.cpp

index 58a9888ea0d3980c699ec03dcfdc65a598d0c526..d21c9c0d59475adc75a3b9cd1bf61df963ed0055 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 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.
@@ -42,7 +42,7 @@ int UtcDaliNativeImageSourceNewN(void)
   catch(Dali::DaliException& e)
   {
     DALI_TEST_PRINT_ASSERT(e);
-    DALI_TEST_ASSERT(e, "Adaptor::IsAvailable()", TEST_LOCATION);
+    DALI_TEST_ASSERT(e, "Dali::Stage::IsCoreThread()", TEST_LOCATION);
   }
   catch(...)
   {
index 33c1788b0b30af2fa9d404f469c9c71e7deac165..2ce4e604c064d8fe6293102ddbad0a2c8ee7050c 100644 (file)
@@ -571,10 +571,13 @@ void Adaptor::Stop()
 
     mCallbackManager->Stop();
 
-    mState = STOPPED;
+    mCore->UnregisterProcessors();
 
     RemoveSystemInformation();
 
+    // Note: Must change the state at end of function.
+    mState = STOPPED;
+
     DALI_LOG_RELEASE_INFO("Adaptor::Stop\n");
   }
 }
@@ -769,13 +772,13 @@ bool Adaptor::RemoveWindow(Internal::Adaptor::SceneHolder* childWindow)
 
 Dali::Adaptor& Adaptor::Get()
 {
-  DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated");
+  DALI_ASSERT_ALWAYS((gThreadLocalAdaptor != NULL) && "Adaptor not instantiated");
   return gThreadLocalAdaptor->mAdaptor;
 }
 
 bool Adaptor::IsAvailable()
 {
-  return gThreadLocalAdaptor != NULL;
+  return gThreadLocalAdaptor != NULL && (gThreadLocalAdaptor->mState != Adaptor::State::STOPPED);
 }
 
 void Adaptor::SceneCreated()
index 9c347b43bfdf5ba2e0d43b001358d6cc9345605c..5d3fbdbeb256359a11ece264917d3303e42ec37d 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.
@@ -87,26 +87,52 @@ void Adaptor::Stop()
 
 bool Adaptor::AddIdle(CallbackBase* callback, bool hasReturnValue)
 {
-  DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated");
-  return mImpl->AddIdle(callback, hasReturnValue);
+  if(IsAvailable())
+  {
+    return mImpl->AddIdle(callback, hasReturnValue);
+  }
+  else
+  {
+    DALI_LOG_ERROR("Adaptor not instantiated");
+    return false;
+  }
 }
 
 bool Adaptor::AddWindow(Dali::Integration::SceneHolder childWindow)
 {
-  DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated");
-  return mImpl->AddWindow(childWindow);
+  if(IsAvailable())
+  {
+    return mImpl->AddWindow(childWindow);
+  }
+  else
+  {
+    DALI_LOG_ERROR("Adaptor not instantiated");
+    return false;
+  }
 }
 
 void Adaptor::RemoveIdle(CallbackBase* callback)
 {
-  DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated");
-  mImpl->RemoveIdle(callback);
+  if(IsAvailable())
+  {
+    mImpl->RemoveIdle(callback);
+  }
+  else
+  {
+    DALI_LOG_ERROR("Adaptor not instantiated");
+  }
 }
 
 void Adaptor::ProcessIdle()
 {
-  DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated");
-  mImpl->ProcessIdle();
+  if(IsAvailable())
+  {
+    mImpl->ProcessIdle();
+  }
+  else
+  {
+    DALI_LOG_ERROR("Adaptor not instantiated");
+  }
 }
 
 void Adaptor::ReplaceSurface(Window window, Dali::RenderSurfaceInterface& surface)
index 96a9f4f1600a0154def6f07bee30dddf57dbefc8..fdf4851e994d8fb608cc18e79bb2e9ab17e667be 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.
@@ -25,6 +25,7 @@
 
 // EXTERNAL INCLUDES
 #include <EGL/egl.h>
+#include <dali/devel-api/common/stage.h>
 #include <dali/integration-api/debug.h>
 #include <include/EGL/eglext.h>
 
@@ -68,7 +69,7 @@ NativeImageSourceAndroid::NativeImageSourceAndroid(uint32_t width, uint32_t heig
   mEglImageExtensions(NULL),
   mResourceDestructionCallback()
 {
-  DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
+  DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface());
   mEglGraphics                = static_cast<EglGraphics*>(graphics);
index 21a9931ec29d2c117f66669352c3ff90c6f3911b..ffb8dee9e1f663e9d8a2cc36b229645c839d9f90 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.
@@ -19,6 +19,7 @@
 #include <dali/internal/imaging/macos/native-image-source-impl-mac.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/common/stage.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -48,7 +49,7 @@ NativeImageSourceCocoa::NativeImageSourceCocoa(
 : mImage(MakeRef<CGImageRef>(nullptr)),
   mResourceDestructionCallback()
 {
-  DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
+  DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
   DALI_ASSERT_ALWAYS(nativeImageSource.Empty());
 
   CFStringRef      colorSpaceName;
index 93d28614e314dcd4daa2bedd71b55cc0109c2480..570ff179be1ec47878e26dfcfa59be30871b5eae 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.
@@ -19,6 +19,7 @@
 #include <dali/internal/imaging/tizen/native-image-source-impl-tizen.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/common/stage.h>
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/gl-defines.h>
 #include <tbm_surface_internal.h>
@@ -91,7 +92,7 @@ NativeImageSourceTizen::NativeImageSourceTizen(uint32_t width, uint32_t height,
   mIsBufferAcquired(false),
   mBackBufferEnabled(false)
 {
-  DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
+  DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface());
   mEglGraphics                = static_cast<EglGraphics*>(graphics);
index 94ad034dc8cd796f3f415301844be7d6e60d615b..602ce31e3668ffc16607e296602de3ade587fa3d 100644 (file)
@@ -19,6 +19,7 @@
 #include <dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/common/stage.h>
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/gl-defines.h>
 #include <tbm_surface_internal.h>
@@ -96,7 +97,7 @@ NativeImageSourceQueueTizen::NativeImageSourceQueueTizen(uint32_t queueCount, ui
   mIsResized(false),
   mFreeRequest(false)
 {
-  DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
+  DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface());
   mEglGraphics                = static_cast<EglGraphics*>(graphics);
index 7c86a3e9cb9135a24c5151aa236eef86bb068ebb..ba50e37774c686f23e5bc6466dad9ccf36889e36 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.
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
+#include <dali/devel-api/common/stage.h>
 #include <dali/integration-api/debug.h>
 #include <dali/internal/system/linux/dali-ecore-x.h>
 
@@ -96,7 +97,7 @@ NativeImageSourceX::NativeImageSourceX(uint32_t width, uint32_t height, Dali::Na
   mEglImageExtensions(NULL),
   mResourceDestructionCallback()
 {
-  DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
+  DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface());
   mEglGraphics                = static_cast<EglGraphics*>(graphics);
index 11a8a87a72d9d0b5fc3261f76315f7f16e8e2de4..7b78a5f1f46715cfdae91637ae252afbf3add180 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.
@@ -19,6 +19,7 @@
 #include <dali/internal/imaging/windows/native-image-source-impl-win.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/common/stage.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -62,7 +63,7 @@ NativeImageSourceWin::NativeImageSourceWin(uint32_t width, uint32_t height, Dali
   mEglImageExtensions(NULL),
   mResourceDestructionCallback()
 {
-  DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
+  DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   GraphicsInterface* graphics = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface());
   mEglGraphics                = static_cast<EglGraphics*>(graphics);
index 3a71586de162d0d870de2e9b6490ea354486754a..5419470a6502d23e596518c60f19b9f4b97fc7f4 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.
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
+#include <dali/devel-api/common/stage.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -97,7 +98,7 @@ NativeImageSourceX::NativeImageSourceX(uint32_t width, uint32_t height, Dali::Na
   mEglImageExtensions(NULL),
   mResourceDestructionCallback()
 {
-  DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
+  DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   GraphicsInterface* graphics    = &(Adaptor::GetImplementation(Adaptor::Get()).GetGraphicsInterface());
   auto               eglGraphics = static_cast<EglGraphics*>(graphics);
index 220ac82b6b878d2308156369af8f0429c75a0bf3..e783f8f4bb6b46ab6de80e7db5a4194e0afcb5aa 100644 (file)
@@ -234,7 +234,7 @@ void TizenPlatformAbstraction::RunTimerFunction(TimerCallback& timerPtr)
 
   mTimerPairsWaiting.erase(timerIter, timerIter + 1);
 
-  if(DALI_UNLIKELY(!Dali::Adaptor::Get().AddIdle(MakeCallback(this, &TizenPlatformAbstraction::CleanupTimers), false)))
+  if(DALI_UNLIKELY(!Dali::Adaptor::IsAvailable() || !Dali::Adaptor::Get().AddIdle(MakeCallback(this, &TizenPlatformAbstraction::CleanupTimers), false)))
   {
     DALI_LOG_ERROR("Fail to add idle callback for timer function. Call it synchronously.\n");
     CleanupTimers();
index 6e9aee45d478dfdc6e46a734e1badfc747cbe7bf..f5a6403cd98e50218f6b0eea5efdb71cba146150 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.
@@ -19,6 +19,7 @@
 #include <dali/internal/system/android/timer-impl-android.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/common/stage.h>
 #include <dali/integration-api/adaptor-framework/android/android-framework.h>
 
 // INTERNAL INCLUDES
@@ -122,7 +123,7 @@ bool TimerCallback(void* data)
 void TimerAndroid::Start()
 {
   // Timer should be used in the event thread
-  DALI_ASSERT_DEBUG(Adaptor::IsAvailable());
+  DALI_ASSERT_DEBUG(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   if(mImpl->mRunning)
   {
@@ -137,7 +138,7 @@ void TimerAndroid::Start()
 void TimerAndroid::Stop()
 {
   // Timer should be used in the event thread
-  DALI_ASSERT_DEBUG(Adaptor::IsAvailable());
+  DALI_ASSERT_DEBUG(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   if(mImpl->mId != 0)
   {
@@ -152,7 +153,7 @@ void TimerAndroid::Stop()
 void TimerAndroid::Pause()
 {
   // Timer should be used in the event thread
-  DALI_ASSERT_DEBUG(Adaptor::IsAvailable());
+  DALI_ASSERT_DEBUG(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   if(mImpl->mRunning)
   {
@@ -165,7 +166,7 @@ void TimerAndroid::Pause()
 void TimerAndroid::Resume()
 {
   // Timer should be used in the event thread
-  DALI_ASSERT_DEBUG(Adaptor::IsAvailable());
+  DALI_ASSERT_DEBUG(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   if(mImpl->mRunning && mImpl->mId == 0)
   {
index d45425e6f53e61abd108faacf1a0a0f7c27c5a07..b0e110b08967d0454ed257a88e4c79234177911d 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.
@@ -19,6 +19,7 @@
 #include <dali/internal/system/linux/timer-impl-ecore.h>
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/common/stage.h>
 #include <dali/integration-api/trace.h>
 
 // INTERNAL INCLUDES
@@ -83,7 +84,7 @@ TimerEcore::~TimerEcore()
 void TimerEcore::Start()
 {
   // Timer should be used in the event thread
-  DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
+  DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   if(mImpl->mId != NULL)
   {
@@ -103,7 +104,7 @@ void TimerEcore::Start()
 void TimerEcore::Stop()
 {
   // Timer should be used in the event thread
-  DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
+  DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   ResetTimerData();
 }
@@ -111,7 +112,7 @@ void TimerEcore::Stop()
 void TimerEcore::Pause()
 {
   // Timer should be used in the event thread
-  DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
+  DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   if(mImpl->mId != NULL)
   {
@@ -128,7 +129,7 @@ void TimerEcore::Pause()
 void TimerEcore::Resume()
 {
   // Timer should be used in the event thread
-  DALI_ASSERT_ALWAYS(Adaptor::IsAvailable());
+  DALI_ASSERT_ALWAYS(Dali::Stage::IsCoreThread() && "Core is not installed. Might call this API from worker thread?");
 
   if(mImpl->mId != NULL)
   {
index d28d7617cf80145d80eb0dfbd49c110312e31e4d..f3fdb2fa9fd20b5cbb21e590e9870cf56c6065cc 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.
@@ -92,7 +92,7 @@ void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
   gGeometryHittest = enable;
-  if(gGeometryHittest)
+  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
index f99132dbac6a9833f5024970d82ae87b35b5100d..105cf0fe3b5e949da4875aa4304e2ea47a91c255 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.
@@ -95,7 +95,7 @@ void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
   gGeometryHittest = enable;
-  if(gGeometryHittest)
+  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
index 3c10c38959527db2d827c4872d8782944a01db54..e0d133c651e72afc5a89bd96561046515087c055 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.
@@ -212,7 +212,7 @@ void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
   gGeometryHittest = enable;
-  if(gGeometryHittest)
+  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
index f40604dee582a200f57605d7d3eb14ec946dc0c5..1812f24e7d9da7dea2593357fd93e1d42fc0ef2f 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.
@@ -91,7 +91,7 @@ void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
   gGeometryHittest = enable;
-  if(gGeometryHittest)
+  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
index 2b415de67c4b6ccf09e99b65c035badaac5a5023..863d166706acd0b824bfd25e7a7591a10132b7b8 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.
@@ -85,7 +85,7 @@ void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
   gGeometryHittest = enable;
-  if(gGeometryHittest)
+  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)
index 3309edb0c4c0079560470b06d569c1cbd553ad29..239c581e9f5bd2ec78acbc0a868e879ce4644d38 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.
@@ -1151,7 +1151,7 @@ void SetGeometryHittestEnabled(bool enable)
 {
   DALI_LOG_RELEASE_INFO("GeometryHittest : %d \n", enable);
   gGeometryHittest = enable;
-  if(gGeometryHittest)
+  if(gGeometryHittest && Dali::Adaptor::IsAvailable())
   {
     Dali::SceneHolderList sceneHolders = Dali::Adaptor::Get().GetSceneHolders();
     for(auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter)