Fix Gtimer stop bug.
This commit is contained in:
parent
1971d889dc
commit
4b891ebc04
1 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@ static DECLARE_THREAD_FUNCTION(GTimerThreadHandler, arg) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// No - get us off the timers list
|
// No - get us off the timers list
|
||||||
if (pt->next == pt->prev)
|
if (pt->next == pt)
|
||||||
pTimerHead = 0;
|
pTimerHead = 0;
|
||||||
else {
|
else {
|
||||||
pt->next->prev = pt->prev;
|
pt->next->prev = pt->prev;
|
||||||
|
@ -148,7 +148,7 @@ void gtimerStart(GTimer *pt, GTimerFunction fn, void *param, bool_t periodic, de
|
||||||
// Is this already scheduled?
|
// Is this already scheduled?
|
||||||
if (pt->flags & GTIMER_FLG_SCHEDULED) {
|
if (pt->flags & GTIMER_FLG_SCHEDULED) {
|
||||||
// Cancel it!
|
// Cancel it!
|
||||||
if (pt->next == pt->prev)
|
if (pt->next == pt)
|
||||||
pTimerHead = 0;
|
pTimerHead = 0;
|
||||||
else {
|
else {
|
||||||
pt->next->prev = pt->prev;
|
pt->next->prev = pt->prev;
|
||||||
|
|
Loading…
Add table
Reference in a new issue