diff --git a/applets/devicenotifier/package/contents/ui/DeviceItem.qml b/applets/devicenotifier/package/contents/ui/DeviceItem.qml index 3fcd40eed..368bc98ca 100644 --- a/applets/devicenotifier/package/contents/ui/DeviceItem.qml +++ b/applets/devicenotifier/package/contents/ui/DeviceItem.qml @@ -182,6 +182,9 @@ Item { } function idleStatus() { + if (!hpSource.data[udi]) { + return; + } var actions = hpSource.data[udi]["actions"]; if (actions.length > 1) { return i18np("1 action for this device", "%1 actions for this device", actions.length); @@ -268,7 +271,7 @@ Item { right: leftActionArea.left } interactive: false - model: hpSource.data[udi]["actions"] + model: hpSource.data[udi] ? hpSource.data[udi]["actions"] : null property int actionVerticalMargins: 5 property int actionIconHeight: units.iconSizes.medium*0.8 height: expanded ? ((actionIconHeight+(2*actionVerticalMargins))*model.length)+anchors.topMargin : 0 diff --git a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml b/applets/devicenotifier/package/contents/ui/FullRepresentation.qml index 354c28dce..69b3153d6 100644 --- a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml +++ b/applets/devicenotifier/package/contents/ui/FullRepresentation.qml @@ -126,7 +126,7 @@ MouseArea { var used = size-freeSpace; return used*100/size; } - freeSpaceText: sdSource.data[udi] ? sdSource.data[udi]["Free Space Text"] : "" + freeSpaceText: sdSource.data[udi] && sdSource.data[udi]["Free Space Text"] ? sdSource.data[udi]["Free Space Text"] : "" leftActionIcon: { if (mounted) {