X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxsel.c;h=0383faa69d02624c9d459afb046f7d0177705687;hb=06434ffc713ff60f7631b48e0b1463fcfc92684b;hp=7142acb2a4cd049cddf296a343d0fdce9c25ed28;hpb=5107780c5498929d76558a4591c4161daaef7d5b;p=PuTTY.git diff --git a/unix/uxsel.c b/unix/uxsel.c index 7142acb2..0383faa6 100644 --- a/unix/uxsel.c +++ b/unix/uxsel.c @@ -115,6 +115,13 @@ int first_fd(int *state, int *rwx) int select_result(int fd, int event) { struct fd *fdstruct = find234(fds, &fd, uxsel_fd_findcmp); - assert(fdstruct != NULL); - return fdstruct->callback(fd, event); + /* + * Apparently this can sometimes be NULL. Can't see how, but I + * assume it means I need to ignore the event since it's on an + * fd I've stopped being interested in. Sigh. + */ + if (fdstruct) + return fdstruct->callback(fd, event); + else + return 1; }