Block Awake when the Adaptor is not available 28/319928/2
authorSeungho Baek <sbsh.baek@samsung.com>
Tue, 5 Nov 2024 08:38:01 +0000 (17:38 +0900)
committerSeungho Baek <sbsh.baek@samsung.com>
Wed, 6 Nov 2024 04:52:14 +0000 (13:52 +0900)
Change-Id: I8b8845534cfd21f534692662891043dab32ff9f2
Signed-off-by: Seungho Baek <sbsh.baek@samsung.com>
dali-csharp-binder/common/processor-controller.cpp

index fd639296caa44b44503fcaaac919d7d55ce86260..ed065796177574d517bee44e74aa6723b4a4a16e 100644 (file)
@@ -109,26 +109,27 @@ void ProcessorController::RemovePostCallback(ProcessorControllerProcessCallback
 
 void ProcessorController::Awake()
 {
-  DALI_ASSERT_ALWAYS(mProcessRegistered && "ProcessorController should be initialized before call Awake");
-
-  if(!mProcessingEvents && !mKeepRenderingApplied)
+  if(DALI_LIKELY(Dali::Adaptor::IsAvailable()))
   {
-    if(DALI_LIKELY(Dali::Adaptor::IsAvailable())) ///< Avoid worker thread calling.
+    DALI_ASSERT_ALWAYS(mProcessRegistered && "ProcessorController should be initialized before call Awake");
+
+    if(!mProcessingEvents && !mKeepRenderingApplied)
     {
       auto stage = Dali::Stage::GetCurrent();
       stage.KeepRendering(0.0f);
       mKeepRenderingApplied = true;
     }
-  }
-  else if(mProcessingEvents && !mProcessEventsIdleRequested)
-  {
-    if(DALI_LIKELY(Dali::Adaptor::IsAvailable())) ///< Avoid worker thread calling.
+    else if(mProcessingEvents && !mProcessEventsIdleRequested)
     {
       // Request ProcessEvents on idle when we are processing now.
       Dali::Adaptor::Get().RequestProcessEventsOnIdle();
       mProcessEventsIdleRequested = true;
     }
   }
+  else
+  {
+    DALI_LOG_ERROR("Awake() failed, Adaptore is not available.\n");
+  }
 }
 
 void ProcessorController::RegisterProcess()