Skip to content

Commit

Permalink
Fix Notify widget crash on finalise
Browse files Browse the repository at this point in the history
If `dbus-next` is not installed the `Notify` widget will crash on
`finalize` as it tries to call `notifier.unregister` but `notifier` is
`None`. This has a knock-on effect of `widgets_map` not being cleared
and additional widgets not being finalised.
  • Loading branch information
elParaguayo committed Oct 20, 2024
1 parent 8e72015 commit c61eb58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libqtile/widget/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,6 @@ def invoke(self):
self._invoke()

def finalize(self):
notifier.unregister(self.update, on_close=self.on_close)
if notifier is not None:
notifier.unregister(self.update, on_close=self.on_close)
base._TextBox.finalize(self)

0 comments on commit c61eb58

Please sign in to comment.