diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-09-24 00:29:06 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-09-24 00:37:11 -0500 |
commit | 432d4561c48cd74f3299eddc270a890908a4512e (patch) | |
tree | 1f57be4c891e3cd199e6aa526eb0f56ad3bcdda1 /pp_ctl.c | |
parent | 0db511c03fa45894d146905ba3408b3be3f5baa0 (diff) | |
download | perl-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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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"); |