mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-16 03:03:40 +01:00
Replace a segfault with an error message
This commit is contained in:
parent
bec2324b78
commit
c90a3078c0
1 changed files with 7 additions and 1 deletions
|
@ -545,7 +545,13 @@ void Hy3Layout::onWindowRemovedTiling(CWindow* window) {
|
||||||
CWindow* Hy3Layout::getNextWindowCandidate(CWindow* window) {
|
CWindow* Hy3Layout::getNextWindowCandidate(CWindow* window) {
|
||||||
auto* node = this->getWorkspaceRootGroup(window->m_iWorkspaceID);
|
auto* node = this->getWorkspaceRootGroup(window->m_iWorkspaceID);
|
||||||
if (node == nullptr) return nullptr;
|
if (node == nullptr) return nullptr;
|
||||||
while (node->data.type == Hy3NodeData::Group) node = node->data.as_group.lastFocusedChild;
|
while (node->data.type == Hy3NodeData::Group) {
|
||||||
|
node = node->data.as_group.lastFocusedChild;
|
||||||
|
if (node == nullptr) {
|
||||||
|
Debug::log(ERR, "A group's last focused child was null when getting the next selection candidate");
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
return node->data.as_window;
|
return node->data.as_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue