effects/kwinquickeffect: ensure view map doesn't contain a nullptr view
BUG: 462014
This commit is contained in:
parent
bd7a6bb65d
commit
cf3b167d50
1 changed files with 5 additions and 2 deletions
|
@ -208,10 +208,13 @@ QuickSceneView *QuickSceneEffect::viewAt(const QPoint &pos) const
|
||||||
|
|
||||||
QuickSceneView *QuickSceneEffect::activeView() const
|
QuickSceneView *QuickSceneEffect::activeView() const
|
||||||
{
|
{
|
||||||
const auto it = std::find_if(d->views.begin(), d->views.end(), [](const auto &view) {
|
auto it = std::find_if(d->views.begin(), d->views.end(), [](const auto &view) {
|
||||||
return view.second->window()->activeFocusItem();
|
return view.second->window()->activeFocusItem();
|
||||||
});
|
});
|
||||||
return it == d->views.end() ? d->views[effects->activeScreen()].get() : it->second.get();
|
if (it == d->views.end()) {
|
||||||
|
it = d->views.find(effects->activeScreen());
|
||||||
|
}
|
||||||
|
return it == d->views.end() ? nullptr : it->second.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
KWin::QuickSceneView *QuickSceneEffect::getView(Qt::Edge edge)
|
KWin::QuickSceneView *QuickSceneEffect::getView(Qt::Edge edge)
|
||||||
|
|
Loading…
Reference in a new issue