diff options
Diffstat (limited to 'src/qml/compiler/qv4jsir.cpp')
-rw-r--r-- | src/qml/compiler/qv4jsir.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4jsir.cpp b/src/qml/compiler/qv4jsir.cpp index 869bf4acaf..50afcf29c2 100644 --- a/src/qml/compiler/qv4jsir.cpp +++ b/src/qml/compiler/qv4jsir.cpp @@ -610,8 +610,10 @@ Function *Module::newFunction(const QString &name, Function *outer) Function *f = new Function(this, outer, name); functions.append(f); if (!outer) { - assert(!rootFunction); - rootFunction = f; + if (!isQmlModule) { + assert(!rootFunction); + rootFunction = f; + } } else { outer->nestedFunctions.append(f); } |