skip null siblings encountered by goto out of loopish block
authorGurusamy Sarathy <gsar@cpan.org>
Tue, 7 Mar 2000 18:21:58 +0000 (18:21 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Tue, 7 Mar 2000 18:21:58 +0000 (18:21 +0000)
(from Doug Lankshear)

p4raw-id: //depot/perl@5598

pp_ctl.c

index 22db833..edbe7b1 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2385,10 +2385,12 @@ PP(pp_goto)
                gotoprobe = PL_main_root;
                break;
            }
-           retop = dofindlabel(gotoprobe, label,
-                               enterops, enterops + GOTO_DEPTH);
-           if (retop)
-               break;
+           if (gotoprobe) {
+               retop = dofindlabel(gotoprobe, label,
+                                   enterops, enterops + GOTO_DEPTH);
+               if (retop)
+                   break;
+           }
            PL_lastgotoprobe = gotoprobe;
        }
        if (!retop)