qml: silence some null deref errors at shutdown
This commit is contained in:
@@ -121,7 +121,8 @@ ApplicationWindow
|
|||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
enabled: Daemon.currentWallet && (!stack.currentItem.title || stack.currentItem.title == Daemon.currentWallet.name)
|
enabled: Daemon.currentWallet &&
|
||||||
|
(!stack.currentItem || !stack.currentItem.title || stack.currentItem.title == Daemon.currentWallet.name)
|
||||||
onClicked: {
|
onClicked: {
|
||||||
stack.getRoot().menu.open() // open wallet-menu
|
stack.getRoot().menu.open() // open wallet-menu
|
||||||
stack.getRoot().menu.y = toolbar.height
|
stack.getRoot().menu.y = toolbar.height
|
||||||
@@ -139,14 +140,15 @@ ApplicationWindow
|
|||||||
Image {
|
Image {
|
||||||
Layout.preferredWidth: constants.iconSizeSmall
|
Layout.preferredWidth: constants.iconSizeSmall
|
||||||
Layout.preferredHeight: constants.iconSizeSmall
|
Layout.preferredHeight: constants.iconSizeSmall
|
||||||
visible: Daemon.currentWallet && (!stack.currentItem.title || stack.currentItem.title == Daemon.currentWallet.name)
|
visible: Daemon.currentWallet &&
|
||||||
|
(!stack.currentItem || !stack.currentItem.title || stack.currentItem.title == Daemon.currentWallet.name)
|
||||||
source: '../../icons/wallet.png'
|
source: '../../icons/wallet.png'
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: Math.max(implicitHeight, toolbarTopLayout.height)
|
Layout.preferredHeight: Math.max(implicitHeight, toolbarTopLayout.height)
|
||||||
text: stack.currentItem.title
|
text: stack.currentItem && stack.currentItem.title
|
||||||
? stack.currentItem.title
|
? stack.currentItem.title
|
||||||
: Daemon.currentWallet.name
|
: Daemon.currentWallet.name
|
||||||
elide: Label.ElideRight
|
elide: Label.ElideRight
|
||||||
|
|||||||
Reference in New Issue
Block a user