diff --git a/src/mkvtoolnix-gui/merge/attachment_model.cpp b/src/mkvtoolnix-gui/merge/attachment_model.cpp index 5bb86fd7f..3c73d20fd 100644 --- a/src/mkvtoolnix-gui/merge/attachment_model.cpp +++ b/src/mkvtoolnix-gui/merge/attachment_model.cpp @@ -80,7 +80,7 @@ AttachmentModel::removeSelectedAttachments(QItemSelection const &selection) { auto sortedRowsToRemove = rowsToRemove.toList(); std::sort(sortedRowsToRemove.begin(), sortedRowsToRemove.end(), std::greater()); - for (auto row : rowsToRemove) + for (auto row : sortedRowsToRemove) removeRow(row); }