From 3aa45e555af72a3b5febeaf307f9c655d9f311ac Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Fri, 17 Dec 2021 11:11:17 +0100 Subject: [PATCH] Don't attempt to change globaldrawer properties if it's not loaded yet --- src/qml/main.qml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/qml/main.qml b/src/qml/main.qml index f77d6377..e2bffaf1 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -40,12 +40,14 @@ Kirigami.ApplicationWindow { } function changeNavigation(isNarrow) { - if (isNarrow) { - globalDrawer.collapsed = true - globalDrawer.width = Layout.implicitWidth - } else { - globalDrawer.collapsed = false - globalDrawer.width = originalWidth + if (globalDrawer) { + if (isNarrow) { + globalDrawer.collapsed = true + globalDrawer.width = Layout.implicitWidth + } else { + globalDrawer.collapsed = false + globalDrawer.width = originalWidth + } } }