From 1c40627570b941dae9735ced05b7bf9d3ef380bc Mon Sep 17 00:00:00 2001 From: LordGrimmauld Date: Mon, 1 Apr 2024 17:37:40 +0200 Subject: [PATCH] fix NPE --- Keys/MainWindowAwareKeyListener.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Keys/MainWindowAwareKeyListener.h b/Keys/MainWindowAwareKeyListener.h index 5f67088..6f5a7df 100644 --- a/Keys/MainWindowAwareKeyListener.h +++ b/Keys/MainWindowAwareKeyListener.h @@ -63,8 +63,9 @@ protected: do { newWorkspace++; workspaceNode = getModel()->getRoot()->findWorkspaceByName(std::to_string(newWorkspace)); - } while (workspaceNode != nullptr && workspaceNode->childCount() != 0 - || (preferredOutput != nullptr && preferredOutput == workspaceNode->findOutput())); + } while (workspaceNode != nullptr + && (workspaceNode->childCount() != 0 + || (preferredOutput != nullptr && preferredOutput == workspaceNode->findOutput()))); return std::to_string(newWorkspace); }