master: guard window in moveWindowTo

fixes #5374
This commit is contained in:
Vaxry 2024-04-02 12:46:05 +01:00
parent 04a35891a1
commit 05eb2d4af2

View file

@ -1005,6 +1005,9 @@ void CHyprMasterLayout::moveWindowTo(CWindow* pWindow, const std::string& dir) {
const auto PWINDOW2 = g_pCompositor->getWindowInDirection(pWindow, dir[0]); const auto PWINDOW2 = g_pCompositor->getWindowInDirection(pWindow, dir[0]);
if (!PWINDOW2)
return;
pWindow->setAnimationsToMove(); pWindow->setAnimationsToMove();
if (pWindow->m_iWorkspaceID != PWINDOW2->m_iWorkspaceID) { if (pWindow->m_iWorkspaceID != PWINDOW2->m_iWorkspaceID) {