4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 09:53:30 +08:00

Merge pull request #3603 from cliff-cmc/master

[dlmodule] Fix crash when dlmodule exit
This commit is contained in:
Bernard Xiong 2020-05-29 08:53:55 +08:00 committed by GitHub
commit 81610509d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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));