summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index aace60b720..006f885288 100644
--- a/toke.c
+++ b/toke.c
@@ -6900,6 +6900,11 @@ Perl_yylex(pTHX)
gv = gv_fetchsv(sv, GV_NOADD_NOINIT | SvUTF8(sv),
SVt_PVCV);
off = 0;
+ if (!gv) {
+ sv_free(sv);
+ sv = NULL;
+ goto just_a_word;
+ }
}
else {
rv2cv_op = newOP(OP_PADANY, 0);