aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4globalobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4globalobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp
index 084b508b52..fca49308cc 100644
--- a/src/qml/jsruntime/qv4globalobject.cpp
+++ b/src/qml/jsruntime/qv4globalobject.cpp
@@ -469,6 +469,10 @@ ReturnedValue GlobalFunctions::method_parseInt(SimpleCallContext *ctx)
// [15.1.2.2] step by step:
String *inputString = string->toString(ctx); // 1
QString trimmed = inputString->toQString().trimmed(); // 2
+
+ if (ctx->engine->hasException)
+ return Encode::undefined();
+
const QChar *pos = trimmed.constData();
const QChar *end = pos + trimmed.length();