From 736309ef1ff64b99c0f114178d6b83b4c69fb3b4 Mon Sep 17 00:00:00 2001 From: Tom Benham Date: Sun, 17 Mar 2024 23:00:48 +0100 Subject: [PATCH] Fixed segfault --- src/modules/hyprland/workspaces.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/hyprland/workspaces.cpp b/src/modules/hyprland/workspaces.cpp index 9e368306..3eb408ac 100644 --- a/src/modules/hyprland/workspaces.cpp +++ b/src/modules/hyprland/workspaces.cpp @@ -235,7 +235,10 @@ void Workspaces::doUpdate() { auto wName = wNameRaw.starts_with("special:") ? wNameRaw.substr(8) : wNameRaw; return wName == workspace->name(); }); - workspace->setOutput((*updated_workspace)["monitor"].asString()); + + if (updated_workspace != updated_workspaces.end()) { + workspace->setOutput((*updated_workspace)["monitor"].asString()); + } workspace->update(m_format, workspaceIcon); }