Browse Source

KonvergoWindow: strictly ignore forceFSScreen if it's empty

In theory, QScreen::name() could return an empty string. Then this could
would do something, even if the forceFSScreen setting is disabled.

Check it explicitly to avoid this. This also means the setting won't
work if a screen actually has an empty name, but such is life.
Vincent Lang 7 years ago
parent
commit
9fa3a5d19d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/ui/KonvergoWindow.cpp

+ 3 - 0
src/ui/KonvergoWindow.cpp

@@ -442,6 +442,9 @@ void KonvergoWindow::updateForcedScreen()
 {
   QString screenName = SettingsComponent::Get().value(SETTINGS_SECTION_MAIN, "forceFSScreen").toString();
 
+  if (screenName.isEmpty())
+    return;
+
   for (QScreen* scr : QGuiApplication::screens())
   {
     if (scr->name() == screenName)