diff --git a/libnymea-common/types/tags.cpp b/libnymea-common/types/tags.cpp index 7f9649af..b55cfa9a 100644 --- a/libnymea-common/types/tags.cpp +++ b/libnymea-common/types/tags.cpp @@ -82,6 +82,9 @@ void Tags::addTag(Tag *tag) void Tags::addTags(QList tags) { + if (tags.isEmpty()) { + return; + } beginInsertRows(QModelIndex(), m_list.count(), m_list.count() + tags.count() - 1); foreach (Tag *tag, tags) { tag->setParent(this);