diff --git a/src/lib/webengine/webscrollbarmanager.cpp b/src/lib/webengine/webscrollbarmanager.cpp index 5f279222a..465d74da2 100644 --- a/src/lib/webengine/webscrollbarmanager.cpp +++ b/src/lib/webengine/webscrollbarmanager.cpp @@ -142,7 +142,7 @@ void WebScrollBarManager::addWebView(WebView *view) QPointer p(view); view->page()->runJavaScript(source, WebPage::SafeJsWorld, [=](const QVariant &res) { - if (!p) { + if (!p || !m_scrollbars.contains(view)) { return; } const QVariantMap map = res.toMap();