From: Florian Ragwitz Date: Sat, 22 Aug 2009 09:29:04 +0000 (+0200) Subject: gv_efullname3() could return NULL, so mro::_nextcan() must cope (and croak()). X-Git-Tag: 0.12_02~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FClass-C3-XS.git;a=commitdiff_plain;h=a2051bf948cf922e8b2f80580cb86ce56dc36e45 gv_efullname3() could return NULL, so mro::_nextcan() must cope (and croak()). --- diff --git a/XS.xs b/XS.xs index 94ef956..4ced6b8 100644 --- a/XS.xs +++ b/XS.xs @@ -411,8 +411,14 @@ XS(XS_Class_C3_XS_nextcan) gv_efullname3(sv, cvgv, NULL); - fq_subname = SvPVX(sv); - fq_subname_len = SvCUR(sv); + if (SvPOK(sv)) { + fq_subname = SvPVX(sv); + fq_subname_len = SvCUR(sv); + + subname = strrchr(fq_subname, ':'); + } else { + subname = NULL; + } subname = strrchr(fq_subname, ':'); if(!subname)