From: Marcus Holland-Moritz Date: Thu, 1 Jul 2004 14:30:05 +0000 (+0000) Subject: Check for definedness of sv before calling sv_derived_from() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2b140d5b8decb02c0dc8e1cbc8c7b48b458da666;p=p5sagit%2Fp5-mst-13.2.git Check for definedness of sv before calling sv_derived_from() to prevent "Use of uninitialized value..." warning. p4raw-id: //depot/perl@23021 --- diff --git a/universal.c b/universal.c index 6b2214d..ef4d95b 100644 --- a/universal.c +++ b/universal.c @@ -374,7 +374,7 @@ XS(XS_UNIVERSAL_VERSION) vnumify(req),vnormal(req),vnumify(sv),vnormal(sv)); } - if ( sv_derived_from(sv, "version") ) { + if ( SvOK(sv) && sv_derived_from(sv, "version") ) { ST(0) = vnumify(sv); } else { ST(0) = sv;