Ignore blank URLs when applying per-domain stylesheets

This commit is contained in:
Jordyn/The Linux Geek 2018-04-20 00:29:48 -05:00 committed by Florian Bruhin
parent b04934c2b3
commit 92211caea4

View File

@ -813,6 +813,12 @@ class AbstractTab(QWidget):
self.url_changed.emit(url) self.url_changed.emit(url)
url = self.url(requested=True) url = self.url(requested=True)
# Ignore blank QUrls to avoid crashes.
if not url.isValid():
log.webview.debug("Not updating per-domain stylesheets due to the QUrl being blank")
return
self._update_stylesheet(url) self._update_stylesheet(url)
@pyqtSlot() @pyqtSlot()