From 33af51421860bf99b4511daddcf88a40df59ee9b Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Sun, 16 Feb 2020 00:20:47 +0100 Subject: [PATCH] Fix an assertion when there are no tags --- libnymea-common/types/tags.cpp | 3 +++ 1 file changed, 3 insertions(+) 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);