int fd;
int rwx; /* 4=except 2=write 1=read */
uxsel_callback_fn callback;
- int id; /* for uxsel_input_remove */
+ uxsel_id *id; /* for uxsel_input_remove */
};
static tree234 *fds;
{
struct fd *oldfd = find234(fds, &fd, uxsel_fd_findcmp);
if (oldfd) {
- uxsel_input_remove(oldfd->id);
+ if (oldfd->id)
+ uxsel_input_remove(oldfd->id);
del234(fds, oldfd);
sfree(oldfd);
}