diff options
author | Lars Knoll <[email protected]> | 2015-01-10 22:04:54 +0100 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2015-01-12 14:52:50 +0100 |
commit | 447844aa25754db7e868469de4537af4331709ac (patch) | |
tree | 80245a0d948e87c8cfd7a35eb5fdc93a65105ccd /src/qml/jsruntime/qv4sequenceobject.cpp | |
parent | 56211be8a0429fb3e3fa268c7698e1df079aa04e (diff) |
Get rid of Value::engine()
This method is not guaranteed to return an engine. We're safer
checking for the value being an object first and then getting
the engine from there.
Change-Id: I5c95e675337e545f2421613bd31c42d1e58d6f9a
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4sequenceobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4sequenceobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp index a60a44642f..8c6d28305f 100644 --- a/src/qml/jsruntime/qv4sequenceobject.cpp +++ b/src/qml/jsruntime/qv4sequenceobject.cpp @@ -650,7 +650,7 @@ QVariant SequencePrototype::toVariant(const QV4::ValueRef array, int typeHint, b *succeeded = false; return QVariant(); } - QV4::Scope scope(array->engine()); + QV4::Scope scope(array->asObject()->engine()); QV4::ScopedArrayObject a(scope, array); FOREACH_QML_SEQUENCE_TYPE(SEQUENCE_TO_VARIANT) { /* else */ *succeeded = false; return QVariant(); } |