]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - unix/uxsel.c
Move MODULE files out of individual project directories into a
[PuTTY.git] / unix / uxsel.c
index 7142acb2a4cd049cddf296a343d0fdce9c25ed28..0383faa69d02624c9d459afb046f7d0177705687 100644 (file)
@@ -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;
 }