summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-08-28 10:28:28 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-08-28 10:28:28 -0700
commit9d8e4b9b32800eb499d83442ce8bbe6639773936 (patch)
tree13d44cae33d83657d312174f587829a65b932214 /util.c
parentdb5cc3ee5bdb14c8d59302b6c3ef8ff4bca660bb (diff)
downloadperl-9d8e4b9b32800eb499d83442ce8bbe6639773936.tar.gz
Fix crash with lex subs under -d
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 98b121f9e4..dea60acf48 100644
--- a/util.c
+++ b/util.c
@@ -5350,10 +5350,10 @@ Perl_get_db_sub(pTHX_ SV **svp, CV *cv)
if (!PERLDB_SUB_NN) {
GV *gv = CvGV(cv);
- if (!svp) {
+ if (gv && !svp) {
gv_efullname3(dbsv, gv, NULL);
}
- else if ( (CvFLAGS(cv) & (CVf_ANON | CVf_CLONED))
+ else if ( (CvFLAGS(cv) & (CVf_ANON | CVf_CLONED)) || !gv
|| strEQ(GvNAME(gv), "END")
|| ( /* Could be imported, and old sub redefined. */
(GvCV(gv) != cv || !S_gv_has_usable_name(aTHX_ gv))