aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/compiler/qv4codegen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 43756a6f35..94562ead7f 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -2116,7 +2116,7 @@ bool Codegen::visit(LabelledStatement *ast)
// check that no outer loop contains the label
Loop *l = _loop;
while (l) {
- if (l->labelledStatement->label == ast->label) {
+ if (l->labelledStatement && l->labelledStatement->label == ast->label) {
QString error = QString(QStringLiteral("Label '%1' has already been declared")).arg(ast->label.toString());
throwSyntaxError(ast->firstSourceLocation(), error);
}