diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2004-07-01 14:30:05 +0000 |
---|---|---|
committer | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2004-07-01 14:30:05 +0000 |
commit | 2b140d5b8decb02c0dc8e1cbc8c7b48b458da666 (patch) | |
tree | d34ab84831a181203574a491183045a1a28aaa72 | |
parent | ff270adde2ed532b630356e4973f5a74e6152498 (diff) | |
download | perl-2b140d5b8decb02c0dc8e1cbc8c7b48b458da666.tar.gz |
Check for definedness of sv before calling sv_derived_from()
to prevent "Use of uninitialized value..." warning.
p4raw-id: //depot/perl@23021
-rw-r--r-- | universal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/universal.c b/universal.c index 6b2214d249..ef4d95badd 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; |