diff options
Diffstat (limited to 'unix')
-rw-r--r-- | unix/xserver/hw/vnc/vncBlockHandler.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unix/xserver/hw/vnc/vncBlockHandler.c b/unix/xserver/hw/vnc/vncBlockHandler.c index 604dc4ab..390a9b3c 100644 --- a/unix/xserver/hw/vnc/vncBlockHandler.c +++ b/unix/xserver/hw/vnc/vncBlockHandler.c @@ -191,6 +191,9 @@ static void vncWakeupHandler(void * data, int nfds, void * readmask) static struct vncFdEntry* entry; + if (nfds <= 0) + return; + entry = fdsHead; while (entry) { if (entry->read && FD_ISSET(entry->fd, fds)) @@ -231,6 +234,9 @@ void vncWriteWakeupHandler(int nfds, fd_set *fds) { static struct vncFdEntry* entry; + if (nfds <= 0) + return; + entry = fdsHead; while (entry) { if (entry->write && FD_ISSET(entry->fd, fds)) |