diff --git a/src/lib/webengine/webpage.cpp b/src/lib/webengine/webpage.cpp index 7733158cc..d1c2c6cf5 100644 --- a/src/lib/webengine/webpage.cpp +++ b/src/lib/webengine/webpage.cpp @@ -112,7 +112,7 @@ QVariant WebPage::execJavaScript(const QString &scriptSource, int timeout) { QPointer loop = new QEventLoop; QVariant result; - QTimer::singleShot(timeout, loop, &QEventLoop::quit); + QTimer::singleShot(timeout, loop.data(), &QEventLoop::quit); runJavaScript(scriptSource, [loop, &result](const QVariant &res) { if (loop && loop->isRunning()) {