summaryrefslogtreecommitdiff
path: root/src/NextEvent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/NextEvent.c')
-rw-r--r--src/NextEvent.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/NextEvent.c b/src/NextEvent.c
index 181d20e..b1f7bc7 100644
--- a/src/NextEvent.c
+++ b/src/NextEvent.c
@@ -731,7 +731,14 @@ WaitLoop:
#endif
return dpy_no;
}
- goto WaitLoop;
+ if (block)
+ goto WaitLoop;
+ else {
+#ifdef USE_POLL
+ XtStackFree ((XtPointer) wf.fdlist, fdlist);
+#endif
+ return -1;
+ }
}
#define IeCallProc(ptr) \