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.
This commit is contained in:
parent
1d270de336
commit
15bba0dfe2
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user