memory leak fixed

This commit is contained in:
Uwe Rathmann 2023-04-20 10:26:08 +02:00
parent 4f4816bb31
commit 2d6b7b3f46
1 changed files with 10 additions and 2 deletions

View File

@ -249,8 +249,16 @@ static void qskInvokeMetaCall(
if ( receiver.isNull() ) if ( receiver.isNull() )
{ {
// object might have died in the meantime /*
free( arguments ); receiver might have died in the meantime.
We create a dummy event, so that the arguments
are freed by its destructor.
*/
const MetaCallEvent cleanUpEvent(
call, metaObject->d.static_metacall,
offset, index, arguments, nullptr );
return; return;
} }