X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/74aca06df856c5518daf31d2b7a00cc3d798fcaf..0a4022a169cfdd133882ecae233352e769685a1d:/unix/uxsel.c 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; }