diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-05-04 10:52:44 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-05-04 18:13:09 +0000 |
commit | 8e69a9868cfa6f9b054d056dc74e97fbc77f8171 (patch) | |
tree | 811de3f47b4e83fafda669739564514d6da3bb88 /src/qml/jsruntime/qv4stringobject_p.h | |
parent | 798b8d6368dcbcd9b797dad54d87ca0880ad6fb4 (diff) |
Avoid accessing an object with this == nullptr
Get rid of a circular dependency when initializing
StringObject.prototype, by setting it's string value
later during the initialization process.
Change-Id: I5bdaff3936c1f8af12c4d53f95747b8aa43f4ef6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4stringobject_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4stringobject_p.h b/src/qml/jsruntime/qv4stringobject_p.h index 207e9f2781..064ba30f96 100644 --- a/src/qml/jsruntime/qv4stringobject_p.h +++ b/src/qml/jsruntime/qv4stringobject_p.h @@ -70,6 +70,8 @@ DECLARE_HEAP_OBJECT(StringObject, Object) { LengthPropertyIndex = 0 }; + void init(bool /*don't init*/) + { Object::init(); } void init(); void init(const QV4::String *string); |