mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-11-23 12:16:13 +03:00
fix monitor rule possible segv
This commit is contained in:
parent
c3edb20e04
commit
69365c7609
@ -118,7 +118,7 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
||||
PWINDOW->m_iMonitorID = PMONITOR->ID;
|
||||
} else {
|
||||
const long int MONITOR = std::stoi(MONITORSTR);
|
||||
if (MONITOR >= (long int)g_pCompositor->m_vMonitors.size() || MONITOR < (long int)0)
|
||||
if (!g_pCompositor->getMonitorFromID(MONITOR))
|
||||
PWINDOW->m_iMonitorID = 0;
|
||||
else
|
||||
PWINDOW->m_iMonitorID = MONITOR;
|
||||
|
Loading…
Reference in New Issue
Block a user