diff options
author | Aaron Crane <arc@cpan.org> | 2017-01-24 18:25:37 +0000 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2017-01-24 18:27:37 +0000 |
commit | 769b28f489b6336875b378e2e47e731628f45af0 (patch) | |
tree | 297a84f61c0b3be514bcc4ba3d6fdfa77136ae82 /dump.c | |
parent | f0d3f5ace1d11ecf4dd9aea61c56e4f69e5c76e4 (diff) | |
download | perl-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.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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); |