[dlmodule] Fix crash when dlmodule exit

Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
This commit is contained in:
Cliff Chen 2020-05-15 17:53:55 +08:00
parent 4ef35a9dee
commit 42f9de1b42
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ static void _dlmodule_exit(void)
rt_thread_t thread = (rt_thread_t)object;
/* stop timer and suspend thread*/
if ((thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_CLOSE ||
if ((thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_CLOSE &&
(thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_INIT)
{
rt_timer_stop(&(thread->thread_timer));