This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Gv_AMupdate() always creates magic, so mg can never be NULL.
[perl5.git] / gv.c
diff --git a/gv.c b/gv.c
index f012129..c716c2b 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -1601,6 +1601,7 @@ Perl_gv_handler(pTHX_ HV *stash, I32 id)
        Gv_AMupdate(stash);
        mg = mg_find((SV*)stash, PERL_MAGIC_overload_table);
     }
+    assert(mg);
     amtp = (AMT*)mg->mg_ptr;
     if ( amtp->was_ok_am != PL_amagic_generation
         || amtp->was_ok_sub != PL_sub_generation )