summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-08-28 06:31:48 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-08-28 06:33:25 -0700
commit18691622911f2e18df42a5a98ea4c42386f4e558 (patch)
treeee9295e715ff4c67d5cc3620170a57dd2c6dae62 /gv.c
parent4dda930beadeaf9376af54b63f1b18c3c4b4f23a (diff)
downloadperl-18691622911f2e18df42a5a98ea4c42386f4e558.tar.gz
Fix crash when lex subs are used for AUTOLOAD
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 500e24b2c2..7e3058dadd 100644
--- a/gv.c
+++ b/gv.c
@@ -1198,7 +1198,7 @@ Perl_gv_autoload_pvn(pTHX_ HV *stash, const char *name, STRLEN len, U32 flags)
* use that, but for lack of anything better we will use the sub's
* original package to look up $AUTOLOAD.
*/
- varstash = GvSTASH(CvGV(cv));
+ varstash = CvNAMED(cv) ? CvSTASH(cv) : GvSTASH(CvGV(cv));
vargv = *(GV**)hv_fetch(varstash, S_autoload, S_autolen, TRUE);
ENTER;