Fix a valgrind warning about accessing uninitialized memory

Amends change bbfecdee1e.

Change-Id: Iba4ad5101b46f07ce0b3e3397d723e1a681bcbc5
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
bb10
Lars Knoll 2020-08-06 21:00:35 +02:00
parent 81896304dc
commit 150a6c691f
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ struct QPropertyGuardFunctionHelper<T, Class, Guard, false>
static auto guard(const QMetaType &metaType, void *dataPtr,
QPropertyBindingFunction eval, void *owner) -> bool
{
T t;
T t = T();
eval(metaType, &t);
if (!(static_cast<Class *>(owner)->*Guard)(t))
return false;