]> git.vpit.fr Git - perl/modules/indirect.git/commitdiff
Don't even try to fetch the object if the method couldn't be found
authorVincent Pit <vince@profvince.com>
Thu, 26 Feb 2009 11:11:44 +0000 (12:11 +0100)
committerVincent Pit <vince@profvince.com>
Thu, 26 Feb 2009 11:11:44 +0000 (12:11 +0100)
indirect.xs

index 696cf5e2a16062e687021062ce48b17dd34e9c01..2f8ab7de7e87bb461ade74f6d9431b0ce952d8df 100644 (file)
@@ -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)