From b95fee74bbf1afe5d73af9da1241132601dcd7f3 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 23 Jan 2023 09:31:31 +0200 Subject: [PATCH] QtSupport: Fix potential null dereference Shouldn't happen in real life, but done to make Coverity happier. Change-Id: I3316030f59ec74516d2271973ac53c41554c3893 Reviewed-by: hjk --- src/plugins/qtsupport/exampleslistmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp index c7c32e9f295..26af348ca76 100644 --- a/src/plugins/qtsupport/exampleslistmodel.cpp +++ b/src/plugins/qtsupport/exampleslistmodel.cpp @@ -453,7 +453,7 @@ static QList parseDemos(QXmlStreamReader *reader, static QList parseTutorials(QXmlStreamReader *reader, const QString &projectsOffset) { QList result; - std::unique_ptr item; + std::unique_ptr item = std::make_unique(); const QChar slash = QLatin1Char('/'); while (!reader->atEnd()) { switch (reader->readNext()) {