summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 3a81248392..3ff7e7f2fa 100644
--- a/gv.c
+++ b/gv.c
@@ -1259,9 +1259,12 @@ CV*
Perl_gv_handler(pTHX_ HV *stash, I32 id)
{
dTHR;
- MAGIC *mg = mg_find((SV*)stash,'c');
+ MAGIC *mg;
AMT *amtp;
+ if (!stash)
+ return Nullcv;
+ mg = mg_find((SV*)stash,'c');
if (!mg) {
do_update:
Gv_AMupdate(stash);