summaryrefslogtreecommitdiff
path: root/ext/PerlIO/scalar/scalar.xs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/PerlIO/scalar/scalar.xs')
-rw-r--r--ext/PerlIO/scalar/scalar.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/PerlIO/scalar/scalar.xs b/ext/PerlIO/scalar/scalar.xs
index 884cd5880a..0d56ecc613 100644
--- a/ext/PerlIO/scalar/scalar.xs
+++ b/ext/PerlIO/scalar/scalar.xs
@@ -23,7 +23,7 @@ PerlIOScalar_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg,
* or the _name_ of the scalar
*/
if (arg) {
- if (SvROK(arg) && SvTYPE(SvRV(arg)) > SVt_NULL) {
+ if (SvROK(arg)) {
s->var = SvREFCNT_inc(SvRV(arg));
if (!SvPOK(s->var))
(void)SvPV_nolen(s->var);