forked from qt-creator/qt-creator
Fix possible null-pointer access
Change-Id: I609828b4656c00c1c358759f0c844ecb23157b8b Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -620,6 +620,8 @@ void TestTreeModel::qmlFilesAndFunctionNamesForMainFile(const QString &mainFile,
|
|||||||
QList<QString> *functionNames) const
|
QList<QString> *functionNames) const
|
||||||
{
|
{
|
||||||
TestTreeItem *unnamed = unnamedQuickTests();
|
TestTreeItem *unnamed = unnamedQuickTests();
|
||||||
|
if (!unnamed)
|
||||||
|
return;
|
||||||
for (int i = 0; i < unnamed->childCount(); ++i) {
|
for (int i = 0; i < unnamed->childCount(); ++i) {
|
||||||
const TestTreeItem *child = unnamed->child(i);
|
const TestTreeItem *child = unnamed->child(i);
|
||||||
if (child->mainFile() == mainFile) {
|
if (child->mainFile() == mainFile) {
|
||||||
|
Reference in New Issue
Block a user