diff options
author | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-03-03 13:12:52 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-03-03 15:24:32 +0200 |
commit | aba2844a5aecb506d97d869ccd74e8bf76393883 (patch) | |
tree | 0fb21978a77520e213f89892eda12ae593c67a42 | |
parent | 690f15c1029fca5917aca3279da2c2da90dc71f3 (diff) | |
download | qt-creator-aba2844a5aecb506d97d869ccd74e8bf76393883.tar.gz |
Fix possible null-pointer access
Change-Id: I609828b4656c00c1c358759f0c844ecb23157b8b
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
-rw-r--r-- | plugins/autotest/testtreemodel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/autotest/testtreemodel.cpp b/plugins/autotest/testtreemodel.cpp index e707aaa052..eadfb74b7b 100644 --- a/plugins/autotest/testtreemodel.cpp +++ b/plugins/autotest/testtreemodel.cpp @@ -620,6 +620,8 @@ void TestTreeModel::qmlFilesAndFunctionNamesForMainFile(const QString &mainFile, QList<QString> *functionNames) const { TestTreeItem *unnamed = unnamedQuickTests(); + if (!unnamed) + return; for (int i = 0; i < unnamed->childCount(); ++i) { const TestTreeItem *child = unnamed->child(i); if (child->mainFile() == mainFile) { |