summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2004-07-01 14:30:05 +0000
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2004-07-01 14:30:05 +0000
commit2b140d5b8decb02c0dc8e1cbc8c7b48b458da666 (patch)
treed34ab84831a181203574a491183045a1a28aaa72
parentff270adde2ed532b630356e4973f5a74e6152498 (diff)
downloadperl-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.c2
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;