From 00df74bd640ed2e8208e6ca12baaa2ac32936320 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Fri, 27 May 2016 11:03:40 +0200 Subject: [PATCH] Don't add user stylesheet script when usercss is empty --- src/lib/app/mainapplication.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index dc2e5f841..aaf41b1d3 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -1089,6 +1089,9 @@ void MainApplication::setUserStyleSheet(const QString &filePath) m_webProfile->scripts()->remove(oldScript); } + if (userCss.isEmpty()) + return; + QWebEngineScript script; script.setName(name); script.setInjectionPoint(QWebEngineScript::DocumentReady);