Check if widget is deleted in _on_webkit_icon_changed
This commit is contained in:
parent
f8e043214a
commit
4d65abfcc6
@ -23,6 +23,7 @@ import sys
|
|||||||
import functools
|
import functools
|
||||||
import xml.etree.ElementTree
|
import xml.etree.ElementTree
|
||||||
|
|
||||||
|
import sip
|
||||||
from PyQt5.QtCore import (pyqtSlot, Qt, QEvent, QUrl, QPoint, QTimer, QSizeF,
|
from PyQt5.QtCore import (pyqtSlot, Qt, QEvent, QUrl, QPoint, QTimer, QSizeF,
|
||||||
QSize)
|
QSize)
|
||||||
from PyQt5.QtGui import QKeyEvent
|
from PyQt5.QtGui import QKeyEvent
|
||||||
@ -707,6 +708,9 @@ class WebKitTab(browsertab.AbstractTab):
|
|||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def _on_webkit_icon_changed(self):
|
def _on_webkit_icon_changed(self):
|
||||||
"""Emit iconChanged with a QIcon like QWebEngineView does."""
|
"""Emit iconChanged with a QIcon like QWebEngineView does."""
|
||||||
|
if sip.isdeleted(self._widget):
|
||||||
|
log.webview.debug("Got _on_webkit_icon_changed for deleted view!")
|
||||||
|
return
|
||||||
self.icon_changed.emit(self._widget.icon())
|
self.icon_changed.emit(self._widget.icon())
|
||||||
|
|
||||||
@pyqtSlot(QWebFrame)
|
@pyqtSlot(QWebFrame)
|
||||||
|
Loading…
Reference in New Issue
Block a user