summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-01-24 18:25:37 +0000
committerAaron Crane <arc@cpan.org>2017-01-24 18:27:37 +0000
commit769b28f489b6336875b378e2e47e731628f45af0 (patch)
tree297a84f61c0b3be514bcc4ba3d6fdfa77136ae82 /dump.c
parentf0d3f5ace1d11ecf4dd9aea61c56e4f69e5c76e4 (diff)
downloadperl-769b28f489b6336875b378e2e47e731628f45af0.tar.gz
Perl_sv_dump(): allow a null-pointer argument
Since the recursive case already handles null pointers, and this function is specifically aimed at debugging, it seems sensible to handle a null pointer at the top level too.
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/dump.c b/dump.c
index fedea3cd1b..9edc8bf7db 100644
--- a/dump.c
+++ b/dump.c
@@ -2397,9 +2397,7 @@ For an example of its output, see L<Devel::Peek>.
void
Perl_sv_dump(pTHX_ SV *sv)
{
- PERL_ARGS_ASSERT_SV_DUMP;
-
- if (SvROK(sv))
+ if (sv && SvROK(sv))
do_sv_dump(0, Perl_debug_log, sv, 0, 4, 0, 0);
else
do_sv_dump(0, Perl_debug_log, sv, 0, 0, 0, 0);