QtSupport: Fix potential null dereference

Shouldn't happen in real life, but done to make Coverity happier.

Change-Id: I3316030f59ec74516d2271973ac53c41554c3893
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2023-01-23 09:31:31 +02:00
committed by Orgad Shaneh
parent 2336ff5570
commit b95fee74bb

View File

@@ -453,7 +453,7 @@ static QList<ExampleItem *> parseDemos(QXmlStreamReader *reader,
static QList<ExampleItem *> parseTutorials(QXmlStreamReader *reader, const QString &projectsOffset)
{
QList<ExampleItem *> result;
std::unique_ptr<ExampleItem> item;
std::unique_ptr<ExampleItem> item = std::make_unique<ExampleItem>();
const QChar slash = QLatin1Char('/');
while (!reader->atEnd()) {
switch (reader->readNext()) {