X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/4f1dc6c0e6bd6e6e6edab0e55fc6b96824a12f38..a1558a0f509cece0efa6164c6b8ee42d6cdf7f25:/ev.c?ds=sidebyside diff --git a/ev.c b/ev.c index 299ba00..5124b2b 100644 --- a/ev.c +++ b/ev.c @@ -1441,7 +1441,7 @@ void ev_idle_stop (EV_P_ struct ev_idle *w) { ev_clear_pending (EV_A_ (W)w); - if (ev_is_active (w)) + if (!ev_is_active (w)) return; idles [((W)w)->active - 1] = idles [--idlecnt]; @@ -1463,7 +1463,7 @@ void ev_prepare_stop (EV_P_ struct ev_prepare *w) { ev_clear_pending (EV_A_ (W)w); - if (ev_is_active (w)) + if (!ev_is_active (w)) return; prepares [((W)w)->active - 1] = prepares [--preparecnt];