aboutsummaryrefslogtreecommitdiff
path: root/iohandler.c
diff options
context:
space:
mode:
Diffstat (limited to 'iohandler.c')
-rw-r--r--iohandler.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/iohandler.c b/iohandler.c
index dea43552d2..a2d871bb91 100644
--- a/iohandler.c
+++ b/iohandler.c
@@ -56,6 +56,8 @@ int qemu_set_fd_handler2(int fd,
{
IOHandlerRecord *ioh;
+ assert(fd >= 0);
+
if (!fd_read && !fd_write) {
QLIST_FOREACH(ioh, &io_handlers, next) {
if (ioh->fd == fd) {