diff --git a/picard/ui/profileeditor.py b/picard/ui/profileeditor.py index ceb759f2b..0d763335d 100644 --- a/picard/ui/profileeditor.py +++ b/picard/ui/profileeditor.py @@ -261,7 +261,8 @@ class ProfileEditorDialog(SingletonDialog, PicardDialog): """Set tree list highlight bar to proper line if selection change canceled. """ item = self.ui.profile_list.currentItem() - item.setSelected(True) + if item: + item.setSelected(True) self.update_profile_changed_message() def set_current_item(self, item):