From 5a77119ab85290f39132ffe14ed05831dc0c91c8 Mon Sep 17 00:00:00 2001 From: Jay Kamat Date: Fri, 22 Feb 2019 22:25:30 -0800 Subject: [PATCH] Fix crash when getting an invalid url from url_changed --- qutebrowser/browser/webengine/webenginetab.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index 145b6d67d..8577a395f 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -890,6 +890,9 @@ class _WebEngineScripts(QObject): url: The url to get the stylesheet for. 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) if css is configutils.UNSET and force: css = shared.get_user_stylesheet(searching=searching, url=None)