summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-05-29 15:14:34 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-05-29 15:14:34 -0400
commit9adb283733962776a24565b5e2bf9bdfb135b968 (patch)
tree652ebb2ad106502cb252a0a775dad519a6debc90 /dump.c
parentea4b7f3223263018af6a5122e4e3800eddeb92d6 (diff)
downloadperl-9adb283733962776a24565b5e2bf9bdfb135b968.tar.gz
We cannot assert(sv) since sv can be validly null
(see the top of the function), but we can test it.
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/dump.c b/dump.c
index c2d72fdd40..5aaa82ed0d 100644
--- a/dump.c
+++ b/dump.c
@@ -471,8 +471,7 @@ Perl_sv_peek(pTHX_ SV *sv)
finish:
while (unref--)
sv_catpv(t, ")");
- /* XXX when is sv ever NULL? */
- if (TAINTING_get && SvTAINTED(sv))
+ if (TAINTING_get && sv && SvTAINTED(sv))
sv_catpv(t, " [tainted]");
return SvPV_nolen(t);
}