C++98 compatible iterator erase
authorRobin Gareus <robin@gareus.org>
Thu, 15 Dec 2016 09:40:45 +0000 (10:40 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 15 Dec 2016 09:40:45 +0000 (10:40 +0100)
libs/pbd/pbd/abstract_ui.cc

index fcbf298020987bbb2ee017afea809f65d44ae163..c7a37cdef56b9b4bfc03c084f6d6206f1c949050 100644 (file)
@@ -200,8 +200,10 @@ AbstractUI<RequestObject>::handle_ui_requests ()
                if (!(*r)->in_use ()) {
                        assert (!(*r)->valid ());
                        DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("%1 drop invalidation trash %2\n", event_loop_name(), *r));
+                       std::list<InvalidationRecord*>::const_iterator tmp = r;
+                       ++tmp;
                        delete *r;
-                       r = trash.erase (r);
+                       r = tmp;
                } else {
                        ++r;
                }