Fix crash when getting an invalid url from url_changed

This commit is contained in:
Jay Kamat 2019-02-22 22:25:30 -08:00
parent 7c175543d0
commit 5a77119ab8
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

View File

@ -890,6 +890,9 @@ class _WebEngineScripts(QObject):
url: The url to get the stylesheet for. url: The url to get the stylesheet for.
force: Also update the global stylesheet. force: Also update the global stylesheet.
""" """
if not url.isValid():
# FIXME should we be dropping this request completely?
url = None
css = shared.get_user_stylesheet(searching=searching, url=url) css = shared.get_user_stylesheet(searching=searching, url=url)
if css is configutils.UNSET and force: if css is configutils.UNSET and force:
css = shared.get_user_stylesheet(searching=searching, url=None) css = shared.get_user_stylesheet(searching=searching, url=None)