diff options
| author | Manolo Gouy <Manolo> | 2017-07-11 12:03:05 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-07-11 12:03:05 +0000 |
| commit | 9276dad42f66b28221d8208ff19d392b65c07aeb (patch) | |
| tree | 4ed5aadb482cb520f553873d200334faa0f6fc15 | |
| parent | a8f4fbc2ef6bbe56215f1f1305a16194c268f225 (diff) | |
End of fix for STR#3387 "Bug of timer implementation on macosx"
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12306 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_cocoa.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 66184cc4d..bcf53cbac 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -517,6 +517,10 @@ static void realloc_timers() MacTimeout* new_timers = new MacTimeout[mac_timer_alloc]; memset(new_timers, 0, sizeof(MacTimeout)*mac_timer_alloc); memcpy(new_timers, mac_timers, sizeof(MacTimeout) * mac_timer_used); + if (current_timer) { + MacTimeout* newCurrent = new_timers + (current_timer - mac_timers); + current_timer = newCurrent; + } MacTimeout* delete_me = mac_timers; mac_timers = new_timers; delete [] delete_me; |
