mirror of
https://github.com/hyprwm/Hyprland
synced 2025-01-12 09:09:49 +01:00
keybinds: fix nullptr deref in forcekillactive (#9021)
This commit is contained in:
parent
8475a8ef99
commit
da9252a23e
1 changed files with 8 additions and 1 deletions
|
@ -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 {};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue