From: Brian Date: Thu, 13 Sep 2007 20:42:23 +0000 (-0600) Subject: Fix timer problem when using Fortran bindings (submitted by Bill Mitchell) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=885a95f4fa6d8adba2bfc1839b99f404b473f646;p=mesa.git Fix timer problem when using Fortran bindings (submitted by Bill Mitchell) Also, add some comments about what's going on. --- diff --git a/src/glut/glx/glut_event.c b/src/glut/glx/glut_event.c index 0a96e8cf71d..b5df7b23119 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; }