Commit ea4fe985 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

ensure that even if the url is empty, we create some parent to avoid accessing nullptr parent

BUG: 427270
parent a2b5f425
......@@ -1030,7 +1030,8 @@ public:
QUrl lastUrl;
QStandardItem *parent = nullptr;
for (const auto &loc : locations) {
if (loc.uri != lastUrl) {
// ensure we create a parent, if not already there (bug 427270) or we have a different url
if (!parent || loc.uri != lastUrl) {
if (parent) {
parent->setText(QStringLiteral("%1: %2").arg(lastUrl.toLocalFile()).arg(parent->rowCount()));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment