This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
[perl5.git] / doio.c
diff --git a/doio.c b/doio.c
index a1cc42a..1598391 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -717,6 +717,8 @@ Perl_nextargv(pTHX_ register GV *gv)
 #endif
     }
     PL_filemode = 0;
+    if (!GvAV(gv))
+        return Nullfp;
     while (av_len(GvAV(gv)) >= 0) {
        STRLEN oldlen;
        sv = av_shift(GvAV(gv));