From: Vincent Pit Date: Thu, 26 Feb 2009 11:11:44 +0000 (+0100) Subject: Don't even try to fetch the object if the method couldn't be found X-Git-Tag: v0.12~15 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=235bb30e464dc25a35a75cd99d71caa0a97c2230;p=perl%2Fmodules%2Findirect.git Don't even try to fetch the object if the method couldn't be found --- diff --git a/indirect.xs b/indirect.xs index 696cf5e..2f8ab7d 100644 --- a/indirect.xs +++ b/indirect.xs @@ -347,8 +347,14 @@ STATIC OP *indirect_ck_entersub(pTHX_ OP *o) { goto done; mpos = indirect_map_fetch(mop, &mnamesv); + if (!mpos) + goto done; + opos = indirect_map_fetch(oop, &onamesv); - if (mpos && opos && mpos < opos) { + if (!opos) + goto done; + + if (mpos < opos) { const char *mname = SvPV_nolen_const(mnamesv); const char *oname = SvPV_nolen_const(onamesv); if (hint == 2)