QtQml: Construct return type before metaCall
The metacall expects initialized memory. Let's give it what it wants. Fixes: QTBUG-117672 Change-Id: If139029ac4771ac919c5f09728633546e7bb9d1e Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
fa2b22a7a1
commit
02c4c817fe
|
@ -485,6 +485,8 @@ void coerceAndCall(
|
|||
} else if (returnType.sizeOf() > 0) {
|
||||
Q_ALLOCA_ASSIGN(void, transformedResult, returnType.sizeOf());
|
||||
transformedArguments[0] = transformedResult;
|
||||
if (returnType.flags() & QMetaType::NeedsConstruction)
|
||||
returnType.construct(transformedResult);
|
||||
} else {
|
||||
transformedResult = transformedArguments[0] = &argc; // Some non-null marker value
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue