1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-24 12:46:35 +01:00

WebPage: Return early from acceptNavigationRequest when closing app

QtWebEngine is calling this method from qAddPostRoutine function
and it sometimes crashes there in tests on exit.
This commit is contained in:
David Rosca 2018-02-16 10:53:30 +01:00
parent 5152e514a0
commit ec84df81e0
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -397,6 +397,10 @@ void WebPage::setupWebChannelForUrl(const QUrl &url)
bool WebPage::acceptNavigationRequest(const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame)
{
if (mApp->isClosing()) {
return QWebEnginePage::acceptNavigationRequest(url, type, isMainFrame);
}
if (!mApp->plugins()->acceptNavigationRequest(this, url, type, isMainFrame))
return false;