diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 3b261e993..0f549db7c 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);