diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index de4880ea..310ab4b4 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -152,7 +152,7 @@ end -- @param notification Notification object to be destroyed -- @return True if the popup was successfully destroyed, nil otherwise function destroy(notification) - if notification then + if notification and notification.box.screen then local scr = notification.box.screen table.remove(notifications[notification.box.screen][notification.position], notification.idx) hooks.timer.unregister(notification.die)