summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
Diffstat (limited to 'av.c')
-rw-r--r--av.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/av.c b/av.c
index e6c26bc7cb..67ffad9f42 100644
--- a/av.c
+++ b/av.c
@@ -437,7 +437,7 @@ Perl_av_clear(pTHX_ register AV *av)
/* Give any tie a chance to cleanup first */
if (SvRMAGICAL(av)) {
const MAGIC* const mg = SvMAGIC(av);
- if (PL_delaymagic && mg->mg_type == PERL_MAGIC_isa)
+ if (PL_delaymagic && mg && mg->mg_type == PERL_MAGIC_isa)
PL_delaymagic |= DM_ARRAY;
else
mg_clear((SV*)av);