diff options
Diffstat (limited to 'ext/IO/lib/IO/Select.pm')
-rw-r--r-- | ext/IO/lib/IO/Select.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/IO/lib/IO/Select.pm b/ext/IO/lib/IO/Select.pm index f021a797ec..79171023e6 100644 --- a/ext/IO/lib/IO/Select.pm +++ b/ext/IO/lib/IO/Select.pm @@ -46,7 +46,9 @@ sub remove sub exists { my $vec = shift; - $vec->[$vec->_fileno(shift) + FIRST_FD]; + my $fno = $vec->_fileno(shift); + return undef unless defined $fno; + $vec->[$fno + FIRST_FD]; } |