If the scalar has just been upgraded to SVt_RV, there's no way SvPVX
Nicholas Clark [Mon, 20 Mar 2006 10:13:38 +0000 (10:13 +0000)]
can be non-NULL, so no need to check.

p4raw-id: //depot/perl@27548

pp.c

diff --git a/pp.c b/pp.c
index 383b426..6b3ead8 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -172,7 +172,7 @@ PP(pp_rv2gv)
                    }
                    if (SvTYPE(sv) < SVt_RV)
                        sv_upgrade(sv, SVt_RV);
-                   if (SvPVX_const(sv)) {
+                   else if (SvPVX_const(sv)) {
                        SvPV_free(sv);
                        SvLEN_set(sv, 0);
                         SvCUR_set(sv, 0);