summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-09-24 00:29:06 -0500
committerJesse Luehrs <doy@tozt.net>2012-09-24 00:37:11 -0500
commit432d4561c48cd74f3299eddc270a890908a4512e (patch)
tree1f57be4c891e3cd199e6aa526eb0f56ad3bcdda1 /pp_ctl.c
parent0db511c03fa45894d146905ba3408b3be3f5baa0 (diff)
downloadperl-432d4561c48cd74f3299eddc270a890908a4512e.tar.gz
don't crash with -d if DB::DB is seen but not defined [perl #114990]
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index ce882209ce..e857ad451b 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1960,7 +1960,10 @@ PP(pp_dbstate)
const I32 gimme = G_ARRAY;
U8 hasargs;
GV * const gv = PL_DBgv;
- CV * const cv = GvCV(gv);
+ CV * cv = NULL;
+
+ if (gv && isGV_with_GP(gv))
+ cv = GvCV(gv);
if (!cv)
DIE(aTHX_ "No DB::DB routine defined");