summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ev.c b/ev.c
index 066cd88..b5b0c5f 100644
--- a/ev.c
+++ b/ev.c
@@ -1738,6 +1738,10 @@ ev_loop_destroy (EV_P)
{
int i;
+ /* mimic free (0) */
+ if (!EV_A)
+ return;
+
#if EV_CLEANUP_ENABLE
/* queue cleanup watchers (and execute them) */
if (expect_false (cleanupcnt))