summaryrefslogtreecommitdiff
path: root/mro.c
diff options
context:
space:
mode:
authorBrandon Black <blblack@gmail.com>2007-06-27 05:07:54 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-06-28 06:32:01 +0000
commit5be5c7a687aa37f2ea9dec7988eb57cad1f1ec24 (patch)
tree99d8d6a8bdf7da9c442f53ad4ea7ffb2d72e9f48 /mro.c
parent09576c7db8c59458f52d7746e7f4062d64ff34e7 (diff)
downloadperl-5be5c7a687aa37f2ea9dec7988eb57cad1f1ec24.tar.gz
Re: [perl #43357] *DESTROY = sub {} at runtime
From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60706270807r7af65546x8d959b131ffa28e6@mail.gmail.com> p4raw-id: //depot/perl@31489
Diffstat (limited to 'mro.c')
-rw-r--r--mro.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mro.c b/mro.c
index d2ba841c17..01461b145a 100644
--- a/mro.c
+++ b/mro.c
@@ -448,8 +448,10 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
bool is_universal;
struct mro_meta * meta;
- const char * const stashname = HvNAME_get(stash);
- const STRLEN stashname_len = HvNAMELEN_get(stash);
+ const char * const stashname = stash ? HvNAME_get(stash) : NULL;
+ const STRLEN stashname_len = stash ? HvNAMELEN_get(stash) : 0;
+
+ if(!stash) return;
if(!stashname)
Perl_croak(aTHX_ "Can't call mro_isa_changed_in() on anonymous symbol table");