diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-09-13 14:42:23 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-09-13 14:42:23 -0600 |
commit | 885a95f4fa6d8adba2bfc1839b99f404b473f646 (patch) | |
tree | b99dbe84aeea581feaafbb2ed66779cab0433215 /src | |
parent | ab31a3a7647ca1b1567dbc58c6093c523173c988 (diff) |
Fix timer problem when using Fortran bindings (submitted by Bill Mitchell)
Also, add some comments about what's going on.
Diffstat (limited to 'src')
-rw-r--r-- | src/glut/glx/glut_event.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/glut/glx/glut_event.c b/src/glut/glx/glut_event.c index 0a96e8cf71..b5df7b2311 100644 --- a/src/glut/glx/glut_event.c +++ b/src/glut/glx/glut_event.c @@ -172,10 +172,14 @@ handleTimeouts(void) GETTIMEOFDAY(&now); while (IS_AT_OR_AFTER(__glutTimerList->timeout, now)) { timer = __glutTimerList; - __glutTimerList = timer->next; + /* call the timer function */ timer->func(timer->value); + /* remove from the linked list */ + __glutTimerList = timer->next; + /* put this timer on the "free" list */ timer->next = freeTimerList; freeTimerList = timer; + if (!__glutTimerList) break; } |