mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-14 11:35:46 -07:00
keybinds: fix nullptr deref in forcekillactive (#9021)
This commit is contained in:
@@ -983,7 +983,14 @@ uint64_t CKeybindManager::spawnRawProc(std::string args, PHLWORKSPACE pInitialWo
|
|||||||
}
|
}
|
||||||
|
|
||||||
SDispatchResult CKeybindManager::killActive(std::string args) {
|
SDispatchResult CKeybindManager::killActive(std::string args) {
|
||||||
kill(g_pCompositor->m_pLastWindow.lock()->getPID(), SIGKILL);
|
const auto PWINDOW = g_pCompositor->m_pLastWindow.lock();
|
||||||
|
|
||||||
|
if (!PWINDOW) {
|
||||||
|
Debug::log(ERR, "killActive: no window found");
|
||||||
|
return {.success = false, .error = "killActive: no window found"};
|
||||||
|
}
|
||||||
|
|
||||||
|
kill(PWINDOW->getPID(), SIGKILL);
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user