diff options
| author | Manolo Gouy <Manolo> | 2010-12-02 09:07:31 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-12-02 09:07:31 +0000 |
| commit | ad879c3a48f7fa3123ce4e2d6a6030c29a9c247f (patch) | |
| tree | 7f6d564ae8d526792272e7fc29eb5a2746c087c7 /src | |
| parent | e5fc1560b08c411d93c76921812cf60b106b473f (diff) | |
To fix STR #2464
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7937 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 6d2cf6b5b..0dce5fbb6 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2494,13 +2494,15 @@ int Fl::has_timeout(Fl_Timeout_Handler cb, void* data) void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data) { - for (int i = 0; i < mac_timer_used; ++i) { - MacTimeout& t = mac_timers[i]; - if (t.callback == cb && ( t.data == data || data == NULL)) { - delete_timer(t); + if (mac_timer_used) { + for (int i = 0; i < mac_timer_used; ++i) { + MacTimeout& t = mac_timers[i]; + if (t.callback == cb && ( t.data == data || data == NULL)) { + delete_timer(t); + } } + breakMacEventLoop(); } - breakMacEventLoop(); } int MacUnlinkWindow(Fl_X *ip, Fl_X *start) { |
