Throw an exception if the Adaptor is not instantiated 44/235644/3
authorHeeyong Song <heeyong.song@samsung.com>
Mon, 8 Jun 2020 09:41:09 +0000 (18:41 +0900)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 12 Jun 2020 18:21:34 +0000 (18:21 +0000)
Change-Id: I707c2d351d4c28cfb05954cdd6d59c08269d8024

dali/internal/adaptor/common/adaptor.cpp
dali/internal/system/linux/timer-impl-ecore.cpp

index e77dea8..9551d82 100755 (executable)
@@ -107,21 +107,25 @@ void Adaptor::Stop()
 
 bool Adaptor::AddIdle( CallbackBase* callback, bool hasReturnValue )
 {
+  DALI_ASSERT_ALWAYS( IsAvailable() && "Adaptor not instantiated" );
   return mImpl->AddIdle( callback, hasReturnValue, false );
 }
 
 bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow, const std::string& childWindowName, const std::string& childWindowClassName, bool childWindowMode )
 {
+  DALI_ASSERT_ALWAYS( IsAvailable() && "Adaptor not instantiated" );
   return mImpl->AddWindow( childWindow, childWindowName, childWindowClassName, childWindowMode );
 }
 
 void Adaptor::RemoveIdle( CallbackBase* callback )
 {
+  DALI_ASSERT_ALWAYS( IsAvailable() && "Adaptor not instantiated" );
   mImpl->RemoveIdle( callback );
 }
 
 void Adaptor::ProcessIdle()
 {
+  DALI_ASSERT_ALWAYS( IsAvailable() && "Adaptor not instantiated" );
   mImpl->ProcessIdle();
 }
 
index fde050d..7ebea28 100644 (file)
@@ -81,7 +81,7 @@ Timer::~Timer()
 void Timer::Start()
 {
   // Timer should be used in the event thread
-  DALI_ASSERT_DEBUG( Adaptor::IsAvailable() );
+  DALI_ASSERT_ALWAYS( Adaptor::IsAvailable() );
 
   if(mImpl->mId != NULL)
   {
@@ -94,7 +94,7 @@ void Timer::Start()
 void Timer::Stop()
 {
   // Timer should be used in the event thread
-  DALI_ASSERT_DEBUG( Adaptor::IsAvailable() );
+  DALI_ASSERT_ALWAYS( Adaptor::IsAvailable() );
 
   ResetTimerData();
 }
@@ -102,7 +102,7 @@ void Timer::Stop()
 void Timer::Pause()
 {
   // Timer should be used in the event thread
-  DALI_ASSERT_DEBUG( Adaptor::IsAvailable() );
+  DALI_ASSERT_ALWAYS( Adaptor::IsAvailable() );
 
   if( mImpl->mId != NULL )
   {
@@ -113,7 +113,7 @@ void Timer::Pause()
 void Timer::Resume()
 {
   // Timer should be used in the event thread
-  DALI_ASSERT_DEBUG( Adaptor::IsAvailable() );
+  DALI_ASSERT_ALWAYS( Adaptor::IsAvailable() );
 
   if( mImpl->mId != NULL )
   {