summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorblino@mandriva.com <blino@mandriva.com>2008-03-11 19:59:45 -0700
committerSteve Peters <steve@fisharerojo.org>2008-03-12 16:38:20 +0000
commitb63c7c552a2e9cf2b2c5eb492358b8567fd16179 (patch)
treec946e9ebcfe357dc5ea69dc3291840e8a3d3aad4 /av.c
parent0dbed2e582e5e5a1aa8cf32cd879b06d966ccbc2 (diff)
downloadperl-b63c7c552a2e9cf2b2c5eb492358b8567fd16179.tar.gz
[perl #51636] segmentation fault with array ties
From: blino@mandriva.com (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.6.HEAD-25460-1205315984-377.51636-75-0@perl.org> p4raw-id: //depot/perl@33495
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);