forked from qt-creator/qt-creator
QmlJS: Avoid infinite loop on empty list of import paths
Change-Id: I1b7bade71226e4181b2643cabb53f934930afc81 Reviewed-by: Marco Benelli <marco.benelli@qt.io> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
@@ -378,7 +378,7 @@ Import LinkPrivate::importNonFile(Document::Ptr doc, const ImportInfo &importInf
|
||||
const ComponentVersion version = importInfo.version();
|
||||
|
||||
QString libraryPath = modulePath(packageName, version.toString(), importPaths);
|
||||
bool importFound = importLibrary(doc, libraryPath, &import);
|
||||
bool importFound = !libraryPath.isEmpty() && importLibrary(doc, libraryPath, &import);
|
||||
|
||||
// if there are cpp-based types for this package, use them too
|
||||
if (valueOwner->cppQmlTypes().hasModule(packageName)) {
|
||||
|
||||
Reference in New Issue
Block a user