This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69a2352
)
assert(cSVOPo) before derefing it.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Thu, 25 Jun 2015 00:19:55 +0000
(20:19 -0400)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Sat, 27 Jun 2015 03:09:46 +0000
(23:09 -0400)
op.c
patch
|
blob
|
blame
|
history
diff --git
a/op.c
b/op.c
index
2c2c520
..
d78a46e
100644
(file)
--- a/
op.c
+++ b/
op.c
@@
-8449,9
+8449,14
@@
Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs,
gv = gv_fetchpvs("__ANON__::__ANON__", gv_fetch_flags, SVt_PVCV);
has_name = FALSE;
}
- if (!ec)
- move_proto_attr(&proto, &attrs,
- isGV(gv) ? gv : (GV *)cSVOPo->op_sv);
+ if (!ec) {
+ if (isGV(gv)) {
+ move_proto_attr(&proto, &attrs, gv);
+ } else {
+ assert(cSVOPo);
+ move_proto_attr(&proto, &attrs, (GV *)cSVOPo->op_sv);
+ }
+ }
if (proto) {
assert(proto->op_type == OP_CONST);