hyprland/ipc: fix nullptr workspace read in log line

This commit is contained in:
outfoxxed 2025-01-31 23:28:49 -08:00
parent 50026f0934
commit c3ed3b0ee2
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -333,7 +333,8 @@ void HyprlandIpc::onEvent(HyprlandIpcEvent* event) {
auto* monitor = this->findMonitorByName(name, true);
this->setFocusedMonitor(monitor);
monitor->setActiveWorkspace(workspace);
qCDebug(logHyprlandIpc) << "Monitor" << name << "focused with workspace" << workspace->id();
qCDebug(logHyprlandIpc) << "Monitor" << name << "focused with workspace"
<< (workspace ? workspace->id() : -1);
} else if (event->name == "workspacev2") {
auto args = event->parseView(2);
auto id = args.at(0).toInt();