Commit c5fad375 authored by Christian Stenger's avatar Christian Stenger Committed by David Schulz
Browse files

Avoid null pointer access



Change-Id: Ie6f64a97d1d97efaa1e1f3ea784a119981159e62
Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
parent 5b936897
......@@ -598,7 +598,8 @@ QList<TestConfiguration *> TestTreeModel::getSelectedTests() const
QString TestTreeModel::getMainFileForUnnamedQuickTest(const QString &qmlFile) const
{
const TestTreeItem *unnamed = unnamedQuickTests();
for (int row = 0, count = unnamed->childCount(); row < count; ++row) {
const int count = unnamed ? unnamed->childCount() : 0;
for (int row = 0; row < count; ++row) {
const TestTreeItem *child = unnamed->child(row);
if (qmlFile == child->filePath())
return child->mainFile();
......
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