projects
/
platform
/
core
/
uifw
/
dali-adaptor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid debug assert when Timer is destroyed
[platform/core/uifw/dali-adaptor.git]
/
adaptors
/
common
/
event-loop
/
ecore
/
ecore-timer-impl.cpp
diff --git
a/adaptors/common/event-loop/ecore/ecore-timer-impl.cpp
b/adaptors/common/event-loop/ecore/ecore-timer-impl.cpp
index
d392001
..
a05b13f
100644
(file)
--- a/
adaptors/common/event-loop/ecore/ecore-timer-impl.cpp
+++ b/
adaptors/common/event-loop/ecore/ecore-timer-impl.cpp
@@
-79,9
+79,7
@@
Timer::Timer( unsigned int milliSec )
Timer::~Timer()
{
Timer::~Timer()
{
- // stop timers
- Stop();
-
+ ResetTimerData();
delete mImpl;
}
delete mImpl;
}
@@
-102,11
+100,7
@@
void Timer::Stop()
// Timer should be used in the event thread
DALI_ASSERT_DEBUG( Adaptor::IsAvailable() );
// Timer should be used in the event thread
DALI_ASSERT_DEBUG( Adaptor::IsAvailable() );
- if (mImpl->mId != NULL)
- {
- ecore_timer_del(mImpl->mId);
- mImpl->mId = NULL;
- }
+ ResetTimerData();
}
void Timer::SetInterval( unsigned int interval )
}
void Timer::SetInterval( unsigned int interval )
@@
-159,6
+153,15
@@
Dali::Timer::TimerSignalType& Timer::TickSignal()
return mTickSignal;
}
return mTickSignal;
}
+void Timer::ResetTimerData()
+{
+ if (mImpl->mId != NULL)
+ {
+ ecore_timer_del(mImpl->mId);
+ mImpl->mId = NULL;
+ }
+}
+
bool Timer::IsRunning() const
{
return mImpl->mId != NULL;
bool Timer::IsRunning() const
{
return mImpl->mId != NULL;