This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
setting $0 still broken
[perl5.git] / gv.h
diff --git a/gv.h b/gv.h
index 7db4ba0..56cf72d 100644 (file)
--- a/gv.h
+++ b/gv.h
@@ -1,6 +1,7 @@
 /*    gv.h
  *
- *    Copyright (c) 1991-2002, Larry Wall
+ *    Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ *    2000, 2001, 2002, by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -42,7 +43,7 @@ Return the SV from the GV.
 
 #define GvSV(gv)       (GvGP(gv)->gp_sv)
 #define GvREFCNT(gv)   (GvGP(gv)->gp_refcnt)
-#define GvIO(gv)       ((gv) && SvTYPE((SV*)gv) == SVt_PVGV ? GvIOp(gv) : 0)
+#define GvIO(gv)       ((gv) && SvTYPE((SV*)gv) == SVt_PVGV && GvGP(gv) ? GvIOp(gv) : 0)
 #define GvIOp(gv)      (GvGP(gv)->gp_io)
 #define GvIOn(gv)      (GvIO(gv) ? GvIOp(gv) : GvIOp(gv_IOadd(gv)))