summaryrefslogtreecommitdiff
path: root/ext/IO
diff options
context:
space:
mode:
Diffstat (limited to 'ext/IO')
-rw-r--r--ext/IO/lib/IO/Poll.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/IO/lib/IO/Poll.pm b/ext/IO/lib/IO/Poll.pm
index 89b89d4d13..bc928b53c7 100644
--- a/ext/IO/lib/IO/Poll.pm
+++ b/ext/IO/lib/IO/Poll.pm
@@ -46,6 +46,7 @@ sub mask {
my $self = shift;
my $io = shift;
my $fd = fileno($io);
+ return unless defined $fd;
if (@_) {
my $mask = shift;
if($mask) {