GitLab Commit is coming up on August 3-4. Learn how to innovate together using GitLab, the DevOps platform. Register for free: gitlabcommitvirtual2021.com

Commit 15bba0df authored by Benoît Minisini's avatar Benoît Minisini
Browse files

Avoid a possible crash when raising the Link event.

[GB.QT4]
* BUG: Avoid a possible crash when raising the Link event.

[GB.QT5]
* BUG: Avoid a possible crash when raising the Link event.
parent 1d270de3
Pipeline #239734178 failed with stage
in 21 minutes and 56 seconds
......@@ -572,8 +572,12 @@ void CWebView::titleChanged(const QString &title)
void CWebView::linkHovered(const QString &link, const QString &title, const QString &textContent)
{
void *_object = QT.GetObject(((QWebPage*)sender())->view());
set_link(THIS, link);
GB.Raise(THIS, EVENT_LINK, 0);
if (THIS)
{
set_link(THIS, link);
GB.Raise(THIS, EVENT_LINK, 0);
}
}
/*void CWebView::frameCreated(QWebFrame *frame)
......
......@@ -406,7 +406,7 @@ END_PROPERTY
BEGIN_METHOD_VOID(WebView_Clear)
delete WIDGET->page();
//delete WIDGET->page();
WIDGET->setPage(new MyWebPage(WIDGET));
QObject::connect(WIDGET->page(), SIGNAL(linkHovered(const QString &)), &WebViewSignalManager::manager, SLOT(linkHovered(const QString &)));
......@@ -962,8 +962,11 @@ void WebViewSignalManager::linkHovered(const QString &link)
{
void *_object = QT.GetObject(((QWebEnginePage*)sender())->view());
set_link(THIS, link);
GB.Raise(THIS, EVENT_LINK, 0);
if (THIS)
{
set_link(THIS, link);
GB.Raise(THIS, EVENT_LINK, 0);
}
}
void WebViewSignalManager::loadStarted()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment