fix crash in findWindowAtCursor

This commit is contained in:
vaxerski 2022-01-24 18:32:35 +01:00
parent 53dcfa4646
commit d237d4cab4

View file

@ -888,6 +888,9 @@ void CWindowManager::setEffectiveSizePosUsingConfig(CWindow* pWindow) {
CWindow* CWindowManager::findWindowAtCursor() { CWindow* CWindowManager::findWindowAtCursor() {
Vector2D cursorPos = getCursorPos(); Vector2D cursorPos = getCursorPos();
if (!getMonitorFromCursor())
return nullptr;
const auto WORKSPACE = activeWorkspaces[getMonitorFromCursor()->ID]; const auto WORKSPACE = activeWorkspaces[getMonitorFromCursor()->ID];
for (auto& window : windows) { for (auto& window : windows) {