This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
was Re: perldoc segfaulting in XS_UNIVERSAL_VERSION
authorJohn Peacock <jpeacock@rowman.com>
Wed, 13 Jul 2005 14:24:06 +0000 (10:24 -0400)
committerNicholas Clark <nick@ccl4.org>
Wed, 13 Jul 2005 19:43:40 +0000 (19:43 +0000)
Message-ID: <42D55C46.5030905@rowman.com>
Date: Wed, 13 Jul 2005 14:24:06 -0400

p4raw-id: //depot/perl@25141

universal.c

index 507ab14..4506f77 100644 (file)
@@ -338,7 +338,7 @@ XS(XS_UNIVERSAL_VERSION)
 
     gvp = pkg ? (GV**)hv_fetch(pkg,"VERSION",7,FALSE) : Null(GV**);
 
-    if (gvp && isGV(gv = *gvp) && SvOK(sv = GvSV(gv))) {
+    if (gvp && isGV(gv = *gvp) && (sv = GvSV(gv)) && SvOK(sv)) {
         SV *nsv = sv_newmortal();
         sv_setsv(nsv, sv);
         sv = nsv;