diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index 25f578528bbd639da2c8d072285b0a8844ab99a1..297790f34905a5b072681461a4f20e31c31e6b8d 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -1719,12 +1719,16 @@ void QQuickWebEngineView::triggerWebAction(WebAction action) QSizeF QQuickWebEngineView::contentsSize() const { Q_D(const QQuickWebEngineView); + if (!d->adapter) + return QSizeF(); return d->adapter->lastContentsSize(); } QPointF QQuickWebEngineView::scrollPosition() const { Q_D(const QQuickWebEngineView); + if (!d->adapter) + return QPointF(); return d->adapter->lastScrollOffset(); }