summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
Diffstat (limited to 'av.c')
-rw-r--r--av.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/av.c b/av.c
index 02be7cc8cc..85bcf0c5e0 100644
--- a/av.c
+++ b/av.c
@@ -327,6 +327,9 @@ av_clear(register AV *av)
return;
/*SUPPRESS 560*/
+ if (SvREADONLY(av))
+ croak(no_modify);
+
/* Give any tie a chance to cleanup first */
if (SvRMAGICAL(av))
mg_clear((SV*)av);