Fix crash in duplicate labelled statement check
Fix crash in duplicate labelled statement check

Testcase (part of parserstress in tests/auto/qml):

outer: {
   do {
      inner: {}
   } while (false)
}

The labelled statement visitor, when hitting the outter label, would call
enterLoop(), which sets _labelledStatement back to zero. That then gets added
to the Loop object the do-while loop creates, and the duplicate labelled
statement check then for inner would unconditionally dereference
loop->labelledStatement.

In all other places where we access loop->labelledStatement we have a null
pointer check, so let's have one here as well.

Change-Id: I9d5925a2abf4db691c49c0cdec3550938ee02efa
Reviewed-by: Lars Knoll <a812617a4072dcbeb80684eca0f369f0083af109@digia.com>

matthewvogt/qtdeclarative,qmlc/qtdeclarative,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative