diff src/pt-bp.cc @ 10833:e5c752231985

delete set/delete breakpoint functions from tree_if_command and tree_switch_command classes
author John W. Eaton <jwe@octave.org>
date Thu, 29 Jul 2010 17:49:50 -0400
parents 57a59eae83cc
children 960065af9f0f
line wrap: on
line diff
--- a/src/pt-bp.cc
+++ b/src/pt-bp.cc
@@ -214,10 +214,16 @@
 void
 tree_breakpoint::visit_if_command (tree_if_command& cmd)
 {
-  tree_if_command_list *lst = cmd.cmd_list ();
+  if (cmd.line () >= line)
+    take_action (cmd);
 
-  if (lst)
-    lst->accept (*this);
+  if (! found)
+    {
+      tree_if_command_list *lst = cmd.cmd_list ();
+
+      if (lst)
+        lst->accept (*this);
+    }
 }
 
 void