forked from qt-creator/qt-creator
Avoid null pointer access
Change-Id: Ie6f64a97d1d97efaa1e1f3ea784a119981159e62 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
committed by
David Schulz
parent
5b93689702
commit
c5fad37560
@@ -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();
|
||||
|
Reference in New Issue
Block a user