Browse Source

Fix Gtimer stop bug.

remotes/origin_old/ugfx_release_2.6
inmarket 7 years ago
parent
commit
4b891ebc04
  1. 4
      src/gtimer/gtimer.c

4
src/gtimer/gtimer.c

@ -76,7 +76,7 @@ static DECLARE_THREAD_FUNCTION(GTimerThreadHandler, arg) {
} else {
// No - get us off the timers list
if (pt->next == pt->prev)
if (pt->next == pt)
pTimerHead = 0;
else {
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?
if (pt->flags & GTIMER_FLG_SCHEDULED) {
// Cancel it!
if (pt->next == pt->prev)
if (pt->next == pt)
pTimerHead = 0;
else {
pt->next->prev = pt->prev;

Loading…
Cancel
Save