Let we make adaptor invalidate if adaptor stop 75/307675/7
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 05:57:48 +0000 (14:57 +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 58a9888..d21c9c0 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 a77acc2..7b5c5b3 100644 (file)
@@ -552,10 +552,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");
   }
 }
@@ -750,13 +753,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 9c347b4..5d3fbdb 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 96a9f4f..fdf4851 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 21a9931..ffb8dee 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 93d2861..570ff17 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 94ad034..602ce31 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 7c86a3e..ba50e37 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 11a8a87..7b78a5f 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 3a71586..5419470 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 220ac82..e783f8f 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 6e9aee4..f5a6403 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 d45425e..b0e110b 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 d28d761..f3fdb2f 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 f99132d..105cf0f 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 f7fc6c8..5fa1435 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 f40604d..1812f24 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 2b415de..863d166 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 3309edb..239c581 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)