1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -05:00

add some null safety checks

This commit is contained in:
bbedward
2025-11-09 10:35:16 -05:00
parent e0f2c03b91
commit d309957927
2 changed files with 3 additions and 1 deletions

View File

@@ -687,6 +687,7 @@ Item {
enabled: isActive
cursorShape: Qt.PointingHandCursor
onClicked: {
if (!appIcon.windowId) return
if (CompositorService.isHyprland) {
Hyprland.dispatch(`focuswindow address:${appIcon.windowId}`)
} else if (CompositorService.isNiri) {
@@ -755,6 +756,7 @@ Item {
enabled: isActive
cursorShape: Qt.PointingHandCursor
onClicked: {
if (!appIcon.windowId) return
if (CompositorService.isHyprland) {
Hyprland.dispatch(`focuswindow address:${appIcon.windowId}`)
} else if (CompositorService.isNiri) {

View File

@@ -352,7 +352,7 @@ Item {
}
onClicked: (event) => {
if (!windowData) return
if (!windowData || !windowData.address) return
if (event.button === Qt.LeftButton) {
root.overviewOpen = false