diff --git a/declarativeimports/plasmacomponents/qml/ToolBar.qml b/declarativeimports/plasmacomponents/qml/ToolBar.qml index f5633568e..9ecd95efb 100644 --- a/declarativeimports/plasmacomponents/qml/ToolBar.qml +++ b/declarativeimports/plasmacomponents/qml/ToolBar.qml @@ -117,11 +117,13 @@ Item{ } containerA.current = !containerA.current - tools.parent = newContainer - tools.visible = true - tools.anchors.left = newContainer.left - tools.anchors.right = newContainer.right - tools.anchors.verticalCenter = newContainer.verticalCenter + if(tools) { + tools.parent = newContainer + tools.visible = true + tools.anchors.left = newContainer.left + tools.anchors.right = newContainer.right + tools.anchors.verticalCenter = newContainer.verticalCenter + } switch (transition) { case "push":