diff --git a/src/controls/templates/OverlayDrawer.qml b/src/controls/templates/OverlayDrawer.qml --- a/src/controls/templates/OverlayDrawer.qml +++ b/src/controls/templates/OverlayDrawer.qml @@ -111,7 +111,7 @@ property int startX property int mappedStartX - property bool desktopMode: applicationWindow() && applicationWindow().header.toString().indexOf("ToolBarApplicationHeader") !== -1 + property bool desktopMode: applicationWindow() && applicationWindow().header && applicationWindow().header.toString().indexOf("ToolBarApplicationHeader") !== -1 enabled: root.handleVisible && root.modal onPressed: { diff --git a/src/controls/templates/OverlaySheet.qml b/src/controls/templates/OverlaySheet.qml --- a/src/controls/templates/OverlaySheet.qml +++ b/src/controls/templates/OverlaySheet.qml @@ -383,7 +383,7 @@ //* the sheet is disaplayed *under* the controls property int extraMargin: (!root.parent || applicationWindow === "undefined" || - (root.parent === applicationWindow().overlay && root.parent.action.main) || + (root.parent === applicationWindow().overlay && root.parent.action && root.parent.action.main) || !applicationWindow().controlsVisible || !applicationWindow().header || applicationWindow().header.toString().indexOf("ToolBarApplicationHeader") === 0)