aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4numberobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4numberobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index dd13f493f7..098afa8161 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -177,10 +177,9 @@ ReturnedValue NumberPrototype::method_toLocaleString(SimpleCallContext *ctx)
{
Scope scope(ctx);
ScopedValue v(scope, thisNumberValue(ctx));
+ ScopedString str(scope, v->toString(ctx));
if (ctx->engine->hasException)
return Encode::undefined();
-
- ScopedString str(scope, v->toString(ctx));
return str.asReturnedValue();
}