Avoid crash when refreshing style sheet. For some reasons it helps to set and empty stylesheet upfront

This commit is contained in:
Klaus Basan
2018-08-08 20:39:38 +02:00
parent 07a44dfc08
commit ac128eb786
2 changed files with 6 additions and 3 deletions

View File

@@ -180,6 +180,7 @@ void CSwiftLauncher::init()
void CSwiftLauncher::initStyleSheet()
{
if (!sGui || sGui->isShuttingDown()) { return; }
const QString s = sGui->getStyleSheetUtility().styles(
{
CStyleSheetUtility::fileNameFonts(),
@@ -187,6 +188,7 @@ void CSwiftLauncher::initStyleSheet()
CStyleSheetUtility::fileNameSwiftLauncher()
}
);
this->setStyleSheet(""); // clear, otherwise launcher crashing
this->setStyleSheet(s);
}