diff --git a/tests/test_id3v2framefactory.cpp b/tests/test_id3v2framefactory.cpp index b3e98547..d33661ff 100644 --- a/tests/test_id3v2framefactory.cpp +++ b/tests/test_id3v2framefactory.cpp @@ -131,9 +131,9 @@ public: auto f = std::unique_ptr(createFileWithDefaultFactory(fileName)); CPPUNIT_ASSERT(f->isValid()); ID3v2::Tag *tag = getID3v2Tag(*f); - const ID3v2::FrameList frames = tag->frameList(); - for(const auto &frame : frames) { - tag->removeFrame(frame, false); + ID3v2::FrameList frames = tag->frameList(); + for(auto it = frames.begin(); it != frames.end(); it = frames.erase(it)) { + tag->removeFrame(*it); } tag->setArtist("An artist"); tag->setTitle("A title");