History

Fix case in Script.include where urls is empty

Ryan Huffman committed 10 years ago

Commit 73a02661 parent 0d48eb52 files · +11 −0Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 2 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+5−0
@@ -1199,6 +1199,11 @@ void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callbac · 1198 unmodified lines
1199 }1199 }
1200 }1200 }
1201 1201
1202 // If there are no URLs left to download, don't bother attempting to download anything and return early
1203 if (urls.size() == 0) {
1204 return;
1205 }
1206
1202 BatchLoader* loader = new BatchLoader(urls);1207 BatchLoader* loader = new BatchLoader(urls);
1203 EntityItemID capturedEntityIdentifier = currentEntityIdentifier;1208 EntityItemID capturedEntityIdentifier = currentEntityIdentifier;
1204 QUrl capturedSandboxURL = currentSandboxURL;1209 QUrl capturedSandboxURL = currentSandboxURL;