mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-30 14:50:12 +03:00
fix assertion when id is -1
This commit is contained in:
parent
b8a0aaf67d
commit
c23135dd48
@ -222,10 +222,14 @@ QRegion DockCorona::availableScreenRegion(int id) const
|
||||
{
|
||||
const auto screens = qGuiApp->screens();
|
||||
const QScreen *screen{qGuiApp->primaryScreen()};
|
||||
QString scrName = m_screenPool->connector(id);
|
||||
|
||||
QString screenName;
|
||||
|
||||
if (m_screenPool->knownIds().contains(id))
|
||||
screenName = m_screenPool->connector(id);
|
||||
|
||||
foreach (auto scr, screens) {
|
||||
if (scr->name() == scrName) {
|
||||
if (scr->name() == screenName) {
|
||||
screen = scr;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user