diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/PerlIO-via/via.pm | 2 | ||||
-rw-r--r-- | ext/PerlIO-via/via.xs | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ext/PerlIO-via/via.pm b/ext/PerlIO-via/via.pm index 601be80bbc..2fa37b136c 100644 --- a/ext/PerlIO-via/via.pm +++ b/ext/PerlIO-via/via.pm @@ -1,5 +1,5 @@ package PerlIO::via; -our $VERSION = '0.12'; +our $VERSION = '0.13'; require XSLoader; XSLoader::load(); 1; diff --git a/ext/PerlIO-via/via.xs b/ext/PerlIO-via/via.xs index 56889bfef6..95ccb3ac38 100644 --- a/ext/PerlIO-via/via.xs +++ b/ext/PerlIO-via/via.xs @@ -87,7 +87,12 @@ PerlIOVia_method(pTHX_ PerlIO * f, const char *method, CV ** save, int flags, } if (*PerlIONext(f)) { if (!s->fh) { - GV *gv = newGVgen(HvNAME_get(s->stash)); + GV *gv; + char *package = HvNAME_get(s->stash); + + if (!package) + return Nullsv; /* can this ever happen? */ + gv = newGVgen(package); GvIOp(gv) = newIO(); s->fh = newRV((SV *) gv); s->io = GvIOp(gv); |