diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-05-04 15:06:57 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-05-04 18:13:28 +0000 |
commit | 7be7fb0361b22cf481e8defd06e4d1dbb4bbc506 (patch) | |
tree | 99276e6ff34ac58390d96734a1b00c8a7f3195fb /src/qml/jsruntime/qv4object_p.h | |
parent | 8e69a9868cfa6f9b054d056dc74e97fbc77f8171 (diff) |
Fix another ubsan warning
Don't call asReturnedValue() on something that might be null.
Change-Id: I31ab7df7e353dee0718957ec0d5b4edcc72f7a56
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4object_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index 93cc3a1e4b..b5aac35722 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -97,7 +97,7 @@ DECLARE_EXPORTED_HEAP_OBJECT(Object, Base) { void setInlineProperty(ExecutionEngine *e, uint index, Heap::Base *b) { Q_ASSERT(index < vtable()->nInlineProperties); Value *prop = reinterpret_cast<Value *>(this) + vtable()->inlinePropertyOffset + index; - WriteBarrier::write(e, this, prop->data_ptr(), b->asReturnedValue()); + WriteBarrier::write(e, this, prop->data_ptr(), Value::fromHeapObject(b).asReturnedValue()); } PropertyIndex writablePropertyData(uint index) { |