diff --git a/src/lib/webengine/webview.cpp b/src/lib/webengine/webview.cpp index 4ae93def1..bbc58e6a5 100644 --- a/src/lib/webengine/webview.cpp +++ b/src/lib/webengine/webview.cpp @@ -146,6 +146,10 @@ void WebView::setPage(WebPage *page) return; } + if (m_page) { + m_page->deleteLater(); // we are the parent, see below + } + m_page = page; m_page->setParent(this); QWebEngineView::setPage(m_page);