revert VST debug hacks
[ardour.git] / libs / ardour / location.cc
index b46972ef2e8af071f5839a468e20d9845b0685d6..e09a59d42f607ddb99ba8683225681e1ce7bcdfc 100644 (file)
@@ -420,17 +420,19 @@ Locations::clear ()
 {
        {
                Glib::Mutex::Lock lm (lock);
-               LocationList::iterator tmp;
+
                for (LocationList::iterator i = locations.begin(); i != locations.end(); ) {
-                       tmp = i;
+
+                       LocationList::iterator tmp = i;
                        ++tmp;
+
                        if (!(*i)->is_end() && !(*i)->is_start()) {
                                locations.erase (i);
                        }
+
                        i = tmp;
                }
 
-               locations.clear ();
                current_location = 0;
        }
 
@@ -579,7 +581,7 @@ Locations::set_state (const XMLNode& node)
        
        nlist = node.children();
 
-       locations.clear (); // dangerous
+       locations.clear ();
        current_location = 0;
 
        {