Don't scan not loaded script in toolbox

This commit is contained in:
Joachim LF
2020-04-06 18:15:43 +02:00
committed by EmilieNumworks
parent 77af9ab92b
commit 7e02a90b2a

View File

@@ -36,6 +36,12 @@ bool ScriptStore::isFull() {
void ScriptStore::scanScriptsForFunctionsAndVariables(void * context, ScanCallback storeFunction, ScanCallback storeVariable) {
for (int scriptIndex = 0; scriptIndex < numberOfScripts(); scriptIndex++) {
//Don't scan not loaded script
if (!scriptAtIndex(scriptIndex).importationStatus()){
continue;
}
// Handle lexer or parser errors with nlr.
nlr_buf_t nlr;
if (nlr_push(&nlr) == 0) {