Navigation Menu

Skip to content

Commit

Permalink
Create a copy of the imported script array handles
Browse files Browse the repository at this point in the history
This prevents the handles from being double Dispose()'d.
  • Loading branch information
Aaron Kennedy committed Jun 8, 2011
1 parent 8902609 commit 0ad1d42
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/declarative/qml/qdeclarativecomponent.cpp
Expand Up @@ -889,8 +889,11 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentCon
ctxt->imports = component->importCache;

// Nested global imports
if (componentCreationContext && start != -1)
if (componentCreationContext && start != -1) {
ctxt->importedScripts = componentCreationContext->importedScripts;
for (int ii = 0; ii < ctxt->importedScripts.count(); ++ii)
ctxt->importedScripts[ii] = qPersistentNew<v8::Object>(ctxt->importedScripts[ii]);
}

component->importCache->addref();
ctxt->setParent(parentContext);
Expand Down

0 comments on commit 0ad1d42

Please sign in to comment.