From 97782105fd39ce8fa8e05e12aa7ca4f53c4913d9 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Thu, 2 Oct 2025 17:44:53 -0400 Subject: [PATCH] Dock: Safeguards when monitor are connected/reconnected --- Modules/Dock/Dock.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Dock/Dock.qml b/Modules/Dock/Dock.qml index 5652deae..e8c3d21e 100644 --- a/Modules/Dock/Dock.qml +++ b/Modules/Dock/Dock.qml @@ -17,7 +17,7 @@ Variants { required property ShellScreen modelData property real scaling: ScalingService.getScreenScale(modelData) - property bool barIsReady: BarService.isBarReady(modelData.name) + property bool barIsReady: modelData ? BarService.isBarReady(modelData.name) : false Connections { target: BarService @@ -74,7 +74,7 @@ Variants { readonly property int floatingMargin: Settings.data.dock.floatingRatio * Style.marginL * scaling // Bar detection and positioning properties - readonly property bool hasBar: modelData.name ? (Settings.data.bar.monitors.includes(modelData.name) || (Settings.data.bar.monitors.length === 0)) : false + readonly property bool hasBar: modelData && modelData.name ? (Settings.data.bar.monitors.includes(modelData.name) || (Settings.data.bar.monitors.length === 0)) : false readonly property bool barAtBottom: hasBar && Settings.data.bar.position === "bottom" readonly property int barHeight: Style.barHeight * scaling